Generate tokens
Exchange the authorization code you received from the Authorize endpoint for an 'access token' API credential, with which you can communicate with the Mollie API on behalf of the consenting merchant.
This endpoint can only be accessed using OAuth client credentials.
Headers
The OAuth client ID and client secret as basic access credentials.
Pseudo code: "Basic " + toBase64(client_id + ":" + client_secret)
For example: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
This header value must match the type of the request body you send, if there is a request body. For example, if you send the request body as JSON, this header must be set to application/json, and if you send it as form encoded you must set this header to application/x-www-form-urlencoded.
A unique key to ensure idempotent requests. This key should be a UUID v4 string.
Request body
Example request
{
"grant_type": "authorization_code",
"code": "auth_...",
"refresh_token": "refresh_...",
"redirect_uri": "https://example.com/redirect"
}Response
The newly generated access token and refresh token.
Example response
{
"access_token": "access_...",
"refresh_token": "refresh_...",
"expires_in": 3600,
"token_type": "bearer",
"scope": "payments.read"
}Changes
Changed in 4 of the 79 revisions of this API.66
- ○
added the non-success response with the status
response-non-success-status-added
- ○
- ○
the endpoint scheme security
basicAuthwas added to the APIapi-security-added
- ○
the endpoint scheme security
oAuthwas removed from the APIapi-security-removed
This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ▲
media type
application/hal+jsonwas changed to a more general media typeapplication/jsonfor the response statusresponse-media-type-name-generalized
- ▲
- ▲
request property
was restricted to a list of enum valuesrequest-property-became-enum
- ▲
the request property
became not nullablerequest-property-became-not-nullable
- ▲
the request property
became not nullablerequest-property-became-not-nullable
- ▲
the request property
became not nullablerequest-property-became-not-nullable
- ▲
removed the media type
text/htmlfor the response with the statusresponse-media-type-removed
- ○
added the new
authorization_codeenum value to the request propertyrequest-property-enum-value-added
- ○
added the new
refresh_tokenenum value to the request propertyrequest-property-enum-value-added
- ○
added the media type
application/hal+jsonfor the response with the statusresponse-media-type-added
- ▲
Of the 79 revisions, 9 have no diff computed.