Generate a token
Generate a token or a refresh token
- application/json
Request Body
- client_id string required
The client ID of your application that was generated when you registered it.
- client_secret string required
The client secret of your application that was generated when you registered it.
- code string required
The authorization code that you received from requesting an authorization code.
- grant_type string required
Possible values: [
authorization_code
,refresh_token
]The grant type used for obtaining an access token.
- refresh_token string
A required parameter when generating a refresh token.
- 200
- 400
OK
- application/json
- Schema
- Example (from schema)
- Access_token
- Refresh_token
Schema
- access_token string
The access token that you need to use in your requests to the SumUp API.
- expires_in integer
The validity of the access token in seconds.
- refresh_token string
The refresh token provided in the request call
- scope string
List of authorization scopes granted to your access token.
- token_type string
The type of the token. The value is always
Bearer
.
{
"access_token": "string",
"expires_in": 0,
"refresh_token": "string",
"scope": "string",
"token_type": "string"
}
{
"access_token": "565e2d19cef68203170ddadb952141326d14e03f4ccbd46daa079c26c910a864",
"expires_in": 3600,
"refresh_token": "d180031bfe9bac36c336e5746637810272546865e9c9586012f462a56f3fe9af",
"token_type": "Bearer"
}
{
"access_token": "ec410d10ad7f06d3c2598473c9cd61189abcc016900a9938068542bcf9754073",
"expires_in": 3600,
"refresh_token": "d180031bfe9bac36c336e5746637810272546865e9c9586012f462a56f3fe9af",
"scope": "payments user.app-settings transactions.history user.profile_readonly",
"token_type": "Bearer"
}
Bad Request
- application/json
- Schema
- Example (from schema)
- Invalid_ Parameter
- Missing_ Parameter
Schema
- error_code string
Platform code for the error.
- message string
Short description of the error.
{
"error_code": "string",
"message": "string"
}
{
"error": "invalid_grant",
"error_description": "code parameter invalid or expired"
}
{
"error": "invalid_request",
"error_description": "code parameter is missing"
}