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

# Reconnect

> Bring an end user back into Flinks Connect to answer MFA, whether their session was just interrupted or an existing connection needs a live refresh.

Reconnect lets an end user re-enter Flinks Connect to answer MFA and keep their bank connection alive, whether their original session was just interrupted, or it completed days ago and now needs a live refresh.

## When to use it

Two scenarios, one feature:

* **Interrupted session**: the end user closed the tab or navigated away mid-MFA. Bring them back to where they left off.
* **Refresh an existing connection**: a previously authorized account needs fresh data, and the financial institution requires MFA again (e.g., Nightly Refresh failed, on-demand transaction update, MFA answers changed at the bank).

In both cases the outcome is the same: the end user answers MFA in Flinks Connect, and the connection moves forward.

## How it works

Pick the entry point that matches your starting state.

### Interrupted session: you have a live `requestId`

Reload Flinks Connect with the existing `requestId` and a fresh `authorizeToken`. The end user lands directly on the MFA prompt, no restart.

```
https://{instance}-iframe.private.fin.ag/?requestId={requestId}&authorizeToken={token}
```

A fresh `authorizeToken` is **required** on every relaunch (authorize tokens are single-use). You can also append these optional parameters:

| Parameter   | Purpose                                                        |
| :---------- | :------------------------------------------------------------- |
| `demo=true` | Resume against the Flinks Capital demo institution for testing |
| `sync=true` | Retrieve data by polling the API instead of via webhooks       |

The response code on the initiating session API call tells you how to proceed:

| Status | Meaning                        | Action                                                                  |
| :----- | :----------------------------- | :---------------------------------------------------------------------- |
| `200`  | Ready                          | Continue and retrieve data                                              |
| `203`  | MFA pending, session resumable | Relaunch the iframe with the `requestId` so the end user can answer MFA |
| Other  | Not resumable                  | Start a new Flinks Connect session                                      |

| Token           | Validity                |
| :-------------- | :---------------------- |
| `requestId`     | 8 minutes of inactivity |
| Authorize token | 15 minutes              |

If the `requestId` has expired, the end user will need to start a new session.

<Tip>
  Store the `requestId` as soon as you receive it: you only have an 8-minute window to relaunch. Only trigger a reconnect when the end user is present to answer the MFA challenge.
</Tip>

### Refresh: you have a stored `loginId`

Call [/Authorize](/api/authorize/endpoints/authorize) with:

* `LoginId`: the customer's existing `loginId`
* `MostRecentCached: false`: force a live connection to the financial institution
* `Save: true`: persist the refreshed data
* `directRefresh: true`

If the financial institution requires MFA, the API returns a `203` with security challenges. Open Flinks Connect with the same `requestId` and a fresh `authorizeToken` so the end user can answer the MFA:

```
https://{instance}-iframe.private.fin.ag/?requestId={requestId}&authorizeToken={token}
```

After the end user answers MFA, Flinks Connect fires a `REDIRECT` event. Call `/Authorize` again with `MostRecentCached: true` to get a new `requestId`, then call [/GetAccountsDetail](/api/connect/endpoints/account-linking/get-accounts-detail) to retrieve the fresh data.

## Preserve previously selected accounts

If the original session used the [Account Selector](/guides/connect/flinks-connect/widget#account-selection), pass the previously selected account IDs into the Reconnect iframe with [`resumeSelectedAccounts`](/guides/connect/flinks-connect/widget#preserve-account-selection-across-reconnect-sessions). Flinks Connect skips the selector, applies the filter on the backend, and surfaces the IDs in the `REDIRECT` event and redirect URL, so [/GetAccountsDetail](/api/connect/endpoints/account-linking/get-accounts-detail) returns only the originally selected accounts.

```
https://{instance}-iframe.private.fin.ag/?requestId={requestId}&resumeSelectedAccounts={id1},{id2}
```

## Common use cases

* Refreshing data when Nightly Refresh has failed for an account
* Collecting updated transaction history on demand
* Re-authorizing when an account's MFA answers have changed at the bank
