Connect Sessions
Note
In this document we'll use the terminology of "connections" and "connection id". These terms are replacing "credentials" and "credentials_token", but while different generations of our APIs are still in use, keep in mind that those therms can be used interchangeably.
Connect Sessions are designed to help manage the lifecycle of user connections. They become necessary whenever an end-user action is required, such as creating a new connection, updating credentials for an existing connection, or solving a Multi-Factor Authentication (MFA) challenge. Each of these actions requires a unique, non-reusable session. Each session, in turn, is associated with a unique URL to which you must redirect the end-user so they can interact with the Flanks Connect Widget.
The simplified workflow involves:
- Create Session: Use the Connect API to create a session, which returns a session ID and the unique URL.
- Redirect User: Redirect the user to the provided URL to go through the Connect Widget flow.
- Monitor Status: You can check the session status at any time using the List Sessions endpoint.
- Redirect Back: When the user finishes the process, they are redirected to the redirect_url you configured, including the session_id parameter.
- Verify Result: Use the List Sessions endpoint again to check if the session was successful and if a new connection was created.
You can learn how to work with sessions in the Connect Sessions