Access tokens

Generate or refresh an access token

Changed on

Generate an access_tokenyou can use to make requests to our APIs. Choose:

  • Option 1 to generate an access_token and refresh_token for the Data API.
  • Option 2 to generate a new access_token for the Data API using a refresh_token.
  • Option 3 to generate an access_token for the Payments API v3.
post/connect/token

Request

  • Base URL
    https://auth.truelayer-sandbox.com
  • URL
    https://auth.truelayer-sandbox.com/connect/token
  • Auth
    none required

Request body

OR
OR

Response

Successful response returns access_token and optionally refresh_token.

access_tokenstring required

A short-lived JWT token used to access data on behalf of the End user

expires_ininteger required

access_token validity in seconds. Default is 1 hour or specified by provider whichever is lower.

refresh_tokenstring

A long-lived code used to obtain a new access_token when expired. It will be returned only if the scope offline_access was requested

token_typestring required

Type of token returned. Must be Bearer

scopestring

The scope of the access_token. It will be a space-separated list of scopes granted to the access_token.

Changes

    • breaking

      removed the media type text/plain for the response with the status

    • breaking

      the response property became optional for the status

    • warning

      added the new access_denied enum value to the response property for the response status

    • warning

      added the new internal_server_error enum value to the response property for the response status

    • warning

      added the new invalid_grant enum value to the response property for the response status

    • warning

      added the new invalid_request enum value to the response property for the response status

    • warning

      added the new not_found enum value to the response property for the response status

    • warning

      added the new unauthorized enum value to the response property for the response status

    • warning

      added the new unauthorized_client enum value to the response property for the response status

    • info

      added the media type application/json for the response with the status

    • info

      added the optional property to the response with the status