---
title: "Extend a connection"
method: POST
path: "/connections/extend"
tags: ["Connection Management"]
---

# Extend a connection

`POST /connections/extend`

## Request

- Base URL: `https://api.truelayer-sandbox.com`
- URL: `https://api.truelayer-sandbox.com/connections/extend`
- Auth: OAuth 2
  - Authorization code: `https://auth.truelayer.com/token/connect`
  - Token URL: `https://auth.truelayer.com/token/connect`

Starts a process to extend a connection, by reconfirming consent and starting a new authentication if necessary.
You can find out more on how to use this endpoint [here](https://docs.truelayer.com/docs/connections).

## Headers

- `X-Client-Correlation-Id` string

## Request body

- ExtendConnectionRequest
  - `user_has_reconfirmed_consent` boolean, required: Set to `true` if the user has re-confirmed consent in your application. We must review your consent screen and enable your client ID before you can set this field to `true` in production. Set to `false` if you'd like the user to re-confirm consent in TrueLayer's auth dialog (setting to `false` is currently not supported).
  - `client_id` string, required: Your application's client ID, found in TrueLayer Console
  - `client_secret` string, required: Your application's client secret, found in TrueLayer Console
  - `user` NewUser, required: Details of the end user who is connecting to their provider.
    - `id` string: Unique ID for the user
    - `name` string: If you are not regulated, you must provide this value.
    - `email` string, email: If you are not regulated, you must provide one of `email`/`phone`.
    - `phone` string, phone_number: If you are not regulated, you must provide one of `email`/`phone`.
  - `refresh_token` string, required: The refresh token for the connection you want to extend
  - `redirect_uri` string, uri, required: A valid redirect URI for your TrueLayer client ID (set in Console)
  - `state` string: An opaque value used by the client to maintain state between the request and callback
  - `code_challenge` string: PKCE code challenge
  - `response_mode` 'form_post': If set to `form_post`, when we call your redirect URI, we'll include the `code` in a form POST request. If left unset, we'll make a GET request with the code set as a query parameter

## Response `200`

Extend response

- union
  - NoActionNeeded
    - `action_needed` 'no_action_needed', required
    - `access_token` string, required: A short-lived JWT token used to access data on behalf of the End user
    - `expires_in` integer, required: `access_token` validity in seconds. Default is 1 hour or specified by provider whichever is lower.
    - `refresh_token` string, required: A long-lived code used to obtain a new `access_token` when expired.
    - `token_type` string, required: Type of token returned. Must be `Bearer`
  - AuthenticationNeeded
    - `action_needed` 'authentication_needed', required
    - `user_input_link` string, uri, required: A link to direct the end user to confirm additional information. This could be a direct link to a bank authentication, or to TrueLayer if consent has not been re-confirmed.
  - ReconfirmationOfConsentNeeded
    - `action_needed` 'reconfirmation_of_consent_needed', required
    - `user_input_link` string, uri, required: A link to direct the end user to confirm additional information. This could be a direct link to a bank authentication, or to TrueLayer if consent has not been re-confirmed.

## Other responses

- `400`: Validation error response
- `401`: Unauthorised
- `422`: Unprocessable Entity

---

[API](https://skmtc.dev/truelayer/apis/data-api-v1.md) - [All operations](https://skmtc.dev/truelayer/apis/data-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/truelayer/apis/data-api-v1/revisions/2906fd6d5b2a?raw)
