Auth link

Generate a direct bank authentication link

Changed on

Direct bank authentication allows you to generate a link directly to the bank. You can direct your user to this link where they can authorise access to their bank account.

Anyone can test direct bank authentication in our sandbox environment. To use it in production, we must first approve your consent screens. Learn more about consent screen requirements here.

post/v1/authuri

Request

  • Base URL
    https://auth.truelayer-sandbox.com
  • URL
    https://auth.truelayer-sandbox.com/v1/authuri
  • Auth
    none required

Request body

response_type'code' required

Must be "code"

client_idstring required

Your client ID

redirect_uristring required

A valid redirect URI for your TrueLayer client ID (set in Console)

scopestring required

Space separated list of scopes representing the data you're asking the end user to share. Possible values:

  • info
  • accounts
  • balance
  • transactions
  • standing_orders
  • direct_debits
  • offline_access
statestring

An opaque value used by the client to maintain state between the request and callback

consent_idstring required

Identifier to indicate the client has captured the user’s consent themselves. Any alphanumeric string allowed. Should be unique to track that the user has given consent.

data_use_descriptionstring

The exact copy shown to the user explaining what their data will be used for.

provider_idstring required

The ID of the provider to direct the user to, so they can connect their account.

code_challengestring

PKCE code challenge

code_challenge_method'S256'

Must be "S256" if code_challenge is supplied

response_mode'form_post'

Must be "form_post" if provided

auth_inputsobject[]

Specify any required additional user input here. Our Providers API specifies which providers require these extra inputs (steps) and lists possible values where available.

This field requires specifying the input and the value. The key name should be the step field.id sourced from the Providers API and the value should be the user's selection. For example:

"auth_inputs": {
  "branch-name": "stet-credit-agricole-alpes-provence"
}
tracking_idstring

Allows you to query how far the user got in the authentication flow using Auth Journey Analytics.

Example request

{
  "user": {
    "id": "d0e122db-2264-4bbe-97a5-869c95a0aa9e",
    "name": "Alan Turing",
    "email": "alan.turing@bletchleypark.org.uk",
    "phone": "+44777777777"
  },
  "auth_inputs": [
    {
      "branch-name": "stet-credit-agricole-alpes-provence"
    }
  ]
}

Response

Successful response returns the direct auth link in the result field

resultstring uri required

Authentication link. Direct the end user here to (re)authenticate them.

successboolean required

Changes