Skip to main content
POST
/
oauth2
/
token
Request an access token
curl --request POST \
  --url https://merchant-api.integration.resurs.com/oauth2/token \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "scope": "merchant-api",
  "grant_type": "client_credentials",
  "client_id": "90b7f3bfe06f41cb89e1e655b8e4351a",
  "client_secret": "37218dc114e14ed594b36e4e00c92a7f"
}
'
{
  "access_token": "<string>",
  "token_type": "Bearer",
  "expires_in": 86400
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

scope
string
required

Requested scope.

Example:

"merchant-api"

grant_type
string
required

OAuth2 grant type

Example:

"client_credentials"

client_id
string

Client id.

Example:

"90b7f3bfe06f41cb89e1e655b8e4351a"

client_secret
string

Client secret. Requirement depending on client id configuration.

Example:

"37218dc114e14ed594b36e4e00c92a7f"

Response

OK

access_token
string
required

The authorization token.

token_type
string
required

Type of token. For JWT it is "Bearer"

Example:

"Bearer"

expires_in
integer<int64>
required

Number of seconds until the token expires.

Example:

86400