Extend a connection

Get access to your user's account information for longer by allowing your user to reconfirm consent.

🚧

This feature is only available in the UK

Extending a connection is only supported for UK users. For users in the EU, you need to use a refresh_token or reauthenticate with a new access_token for ongoing access to user data.

After creating a connection, you have access to your user’s account information. However, a connection isn’t active forever. You need to extend a connection regularly if you need ongoing access to your user’s account information.

Ensuring that you have a valid and active consent and a valid and active authentication for your user is a complex process with various contributing factors.

To handle this complexity, the simplest way to begin to extend the connection is to call the /connections/extend endpoint. This allows TrueLayer to select the user experience with the least friction when extending the connection.

To extending a connection, you need to build your own reconfirmation of consent process that the user reconfirms consent with before calling /connections/extend. This is confirmed by passing in user_has_reconfirmed_consent: true when making a request.

📘

Reconfirmation of consent UX

We recommend that you design your own reconfirmation of consent UX. The design should follow the same principles as the UX for the initial confirmation of consent. See Reconfirmation UX for more guidance.

Recommended endpoint

We recommend using the connections/extend endpoint to extend a connection. It supersedes the /reauthuri endpoint.

Always avoid creating an entirely new connection when authentication expires. Instead, use connections/extend to obtain a new authorisation for the existing connection. This avoids double billing within a single month.

Responses

When successfully calling /connections/extend, you will receive a response back that includes action_needed. This will direct any further action required on the end user’s part to extend the connection.

No action needed

If connections/extend returns action_needed: "no_action_needed", then the connection has been extended and is able to be used until consent needs to be re-confirmed in the future. The response will also return an updated access_token and refresh_token.

Authentication needed

If connections/extend returns action_needed: "authentication_needed", then the connection also requires the end user to authenticate with their bank. The response will return a user_input_link that you can direct the user toward. Upon successful bank authentication, you will receive a webhook notification to the redirect_uri specified when calling connections/extend, with an exchange_code that can be used to receive an updated access_token from /connect/token

Reconfirmation of consent needed

❗️

Currently not supported

This response is not currently supported in our sandbox or production environment

If connections/extend returns action_needed: "reconfirmation_of_consent_needed", this means you have chosen not to re-confirm consent inside your application. Because consent needs to be fully informed and collected, the response will return a user_input_link that you can direct the user toward. This will direct the end user to the auth dialog to reconfirm consent. This may then involve the user being directed to the bank for authentication. You will receive a webhook notification to the redirect_uri specified when calling /extend, with an exchange_code that can be used to receive an updated access_token from /connect/token.


Did this page help you?