Authorization

Generate a token

Generate a token or a refresh token

post/token

Request body

client_idstring required

The client ID of your application that was generated when you registered it.

client_secretstring required

The client secret of your application that was generated when you registered it.

codestring required

The authorization code that you received from requesting an authorization code.

grant_type'authorization_code' | 'refresh_token' required

The grant type used for obtaining an access token.

refresh_tokenstring

A required parameter when generating a refresh token.

Example request

{
  "client_id": "fOcmczrYtYMJ7Li5GjMLLcUeC9dN",
  "client_secret": "717bd571b54297494cd7a79b491e8f2c1da6189c4cc2d3481380e8366eef539c",
  "code": "be366ce9fccd0c337d1da29b31d06dd1135ab95401562883",
  "grant_type": "refresh_token",
  "refresh_token": "d180031bfe9bac36c336e5746637810272546865e9c9586012f462a56f3fe9af"
}

Response

OK

access_tokenstring

The access token that you need to use in your requests to the SumUp API.

expires_ininteger

The validity of the access token in seconds.

refresh_tokenstring

The refresh token provided in the request call

scopestring

List of authorization scopes granted to your access token.

token_typestring

The type of the token. The value is always Bearer.

Example response

{
  "access_token": "ec410d10ad7f06d3c2598473c9cd61189abcc016900a9938068542bcf9754073",
  "expires_in": 3600,
  "refresh_token": "d180031bfe9bac36c336e5746637810272546865e9c9586012f462a56f3fe9af",
  "scope": "payments user.app-settings transactions.history user.profile_readonly",
  "token_type": "Bearer"
}

Changes