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.

Access with

Basic authentication

Body Params
string
required

If you wish to exchange your authorization code for an app access token, use grant type authorization_code. If you wish to renew your app access token with your refresh token, use grant type refresh_token.

Possible values: authorization_code refresh_token

Show Details
authorization_codeExchange an authorization code for an access token after the merchant has granted consent.
refresh_tokenRenew an expired access token using a refresh token.
string

The authorization code you received when creating the authorization. Only use this field when using grant type authorization_code.

string

The refresh token you received when creating the authorization. Only use this field when using grant type refresh_token.

string

The URL the merchant is sent back to once the request has been authorized. It must match the URL you set when registering your app.

For consecutive refresh token requests, this parameter is required only if the initial authorization code grant request also contained a redirect_uri.

Headers
string
required

The OAuth client ID and client secret as basic access credentials.

Pseudo code: "Basic " + toBase64(client_id + ":" + client_secret)

For example: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

string

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.

string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Basic
base64
:
LoadingLoading…
Response
Choose an example:
application/json
application/hal+json