---
title: "Generate a direct bank authentication link"
method: POST
path: "/v1/authuri"
tags: ["Auth link"]
---

# Generate a direct bank authentication link

`POST /v1/authuri`

## Request

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

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](https://docs.truelayer.com/docs/ais-collecting-user-consent).

## Request body

- DirectBankAuthLinkRequest
  - `response_type` 'code', required: Must be `"code"`
  - `client_id` string, required: Your client ID
  - `redirect_uri` string, required: A valid redirect URI for your TrueLayer client ID (set in Console)
  - `scope` string, 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`
  - `state` string: An opaque value used by the client to maintain state between the request and callback
  - `consent_id` string, 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.
  - `user` object: You must provide the `name` and one of `email` or `phone`.
    - `id` string: A unique ID for the user
    - `name` string: The full name of the user
    - `email` string, email: Email address of the user
    - `phone` string: Phone number of the user
  - `data_use_description` string: The exact copy shown to the user explaining what their data will be used for.
  - `provider_id` string, required: The ID of the provider to direct the user to, so they can connect their account.
  - `code_challenge` string: 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_inputs` object[]: 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_id` string: Allows you to query how far the user got in the authentication flow using Auth Journey Analytics.

## Response `200`

Successful response returns the direct auth link in the `result` field

- AuthUriResponse
  - `result` string, uri, required: Authentication link. Direct the end user here to (re)authenticate them.
  - `success` boolean, required

## Other responses

- `401`: Unauthorized request
- `500`: Internal server error

## Changes

- **2026-11-03** `09fa5e77c65b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/truelayer/apis/authentication-server/changes/v1/authuri/post.md)

---

[API](https://skmtc.dev/truelayer/apis/authentication-server.md) - [All operations](https://skmtc.dev/truelayer/apis/authentication-server/llms.txt) - [OpenAPI document](https://skmtc.dev/truelayer/apis/authentication-server/revisions/09fa5e77c65b?raw)
