Partner authentication in the Yango Deli system

Obtaining an authorisation token.

Note

Content-type header differs between request and response.

Request

POST

/oauth2/token

Body

application/x-www-form-urlencoded
{
    "client_id": "987",
    "client_secret": "g8bKdBiIR9MutCObuexDm7nsgkaXU",
    "grant_type": "client_credentials",
    "scope": "read write"
}

Name

Description

client_id*

Type: string

Example: 987

client_secret*

Type: string

Example: g8bKdBiIR9MutCObuexDm7nsgkaXU

grant_type*

Type: string

Example: client_credentials

scope*

Type: string

Example: read write

Responses

200 OK

Authentication successful.

Body

application/json
{
    "access_token": "bqehYcfk7Tb2zKRkxQ-IaK9nHyntdYnlpJ7kwTNX3B6mIKPws",
    "expires_in": 120,
    "scope": "vendor_management",
    "token_type": "bearer"
}

Name

Description

access_token*

Type: string

Token

Example: bqehYcfk7Tb2zKRkxQ-IaK9nHyntdYnlpJ7kwTNX3B6mIKPws

expires_in*

Type: integer

Token expiration time.

Example: 120

scope

Type: string

Example: vendor_management

token_type

Type: string

Token type

Example: bearer

401 Unauthorized

Authorisation error.

Body

application/json
{
    "message": "string",
    "code": 0,
    "details": {}
}

Name

Description

code*

Type: integer

Error code.

message*

Type: string

Error message.

details

Type: object

No longer supported, please use an alternative and newer version.