> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chift.eu/llms.txt
> Use this file to discover all available pages before exploring further.

# Activation links and redirects

Reference for the activation link returned by [connection creation](/developer-guides/unified-api/how-to-connect), and for where your end-user lands afterwards.

## The activation link

Creating or updating a connection returns one field, `url`. Properties worth knowing:

* Secured by a token that expires **30 minutes** after generation.
* Single purpose: it activates one connection for one consumer.
* Safe to email, but generate it close to when the user will click it. If it expires, `PATCH` the connection to get a fresh one.

## The two parameters

Redirect behaviour is controlled by two settings that are easy to confuse:

|                | Set where                               | Controls                                                              |
| -------------- | --------------------------------------- | --------------------------------------------------------------------- |
| `redirect`     | Body of the connection `POST` / `PATCH` | **Whether** Chift redirects the user after the flow. Default `false`. |
| `redirect_url` | On the consumer, or account-wide        | **Where** the user is sent.                                           |

`redirect_url` can be set per consumer (at creation or update) or once for the whole account — see [Configure account](/back-office/getting-started/configure-account#default-redirection-url). **When both are set, the consumer-level value wins.**

<Note>
  `redirect` is ignored when you pass `integrationid`. With a connector already chosen, Chift always redirects to `redirect_url` on success. There is no marketplace page left to return to.
</Note>

## On connection creation

| Request                                               | Behaviour after activation                                                            |
| ----------------------------------------------------- | ------------------------------------------------------------------------------------- |
| `integrationid` provided                              | Redirects to `redirect_url`.                                                          |
| `integrationid` omitted, `redirect = true`            | Redirects to `redirect_url` after the user completes the flow on Chift's marketplace. |
| `integrationid` omitted, `redirect = false` (default) | User stays on Chift's marketplace page.                                               |

## On connection update

| Request            | Outcome               | Behaviour                                                                                                        |
| ------------------ | --------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `redirect = true`  | Success               | Redirects to `redirect_url`.                                                                                     |
| `redirect = true`  | Error or user cancels | Stays on the page so the user can retry. **Cancel** or **Back to \[account name]** sends them to `redirect_url`. |
| `redirect = false` | Success               | Redirects to Chift's marketplace page.                                                                           |
| `redirect = false` | Error or user cancels | Stays on the page so the user can retry. **Cancel** or **Back to \[account name]** sends them to `redirect_url`. |

## URL parameters on return

When a redirect happens, Chift can append query parameters describing the result:

| Parameter          | Value                                                        |
| ------------------ | ------------------------------------------------------------ |
| `consumerid`       | The consumer that was being connected.                       |
| `connectionid`     | The connection that was created or updated.                  |
| `connectionstatus` | `active` or `inactive`.                                      |
| `error`            | Present only on failure.                                     |
| `isexpirederror`   | Present only on failure, when the cause was an expired link. |

<Warning>
  This must be switched on for your account — see [Configure account](/back-office/getting-started/configure-account#redirect-url-parameters). Until it is, your callback receives a bare `redirect_url` with no parameters.
</Warning>

These parameters are convenient but **not a reliable completion signal**: a user who abandons the flow never returns, and a browser can be closed mid-redirect. Pair them with a webhook or a periodic check — see [Monitoring & updating connections](/developer-guides/monitor-connections).

## Related

* [Create a connection](/developer-guides/unified-api/how-to-connect)
* [Monitoring & updating connections](/developer-guides/monitor-connections)
* [Configure account](/back-office/getting-started/configure-account)
