Skip to content

Integration Example

These are the common steps most integrations with Flanks will have. Your particular use case can be a little different, but it's always a good idea to understand the general principles. Please contact us in case you have any doubts about the integration.

Prerequisites

This guide assumes that you will have some infrastructure on your end to:

  • Send links to final users.
  • Get the users back when they are redirected.
  • Do some sort of mapping between our credentials and your users in your database.
  • Call the Flanks APIs

However, initially you can do all these steps manually to get a grasp of how everything should work.

Configuration

  1. Make sure you can access the Flanks Platform.
  2. Create an Application to authenticate your API calls.
  3. Create a new Session to send to your users.

Add New Connections

The final user starts in your application. To add new connections to the system, you need to:

  • Redirect the user to the session URL.
  • Once the user finishes the login process, they will get redirected to your Redirect URI with a session id.
  • Query the Credentials Status of the new connections until they are not pending anymore (or the data you need is already in created).
  • Query the data you need using the Aggregation API.

The following diagram shows how these integration should look like:

sequenceDiagram
  participant Your Application
  participant Flanks API
  participant User
  participant Flanks Connect

  Your Application->>Flanks API: Create session
  Flanks API-->>Your Application: Return session

  Your Application->>User: Send session URL
  User->>Flanks Connect: Access URL & Log in via widget
  loop Upon demand
    Flanks Connect-->>User: Request challenge (MFA)
    User->>Flanks Connect: Submit challenge (MFA)
  end
  Flanks Connect->>Your Application: Redirect user (with session id)
  Your Application->>Flanks API: Request session
  Flanks API-->>Your Application: Return session
  loop Wait for data to be ready
      Your Application-->>Flanks API: Get credentials status
  end

  Your Application-->>Flanks API: Fetch data