Getting started with flows

Wanting to try out Digital Identity but don’t know where to start? Fear not, here you’ll find all the information you need to get started in no time.

In order to ease the process, you can import this Postman collection:

https://www.getpostman.com/collections/1f33696fa9b4d14b10c6

Creating an API key

The first step is to create an API key, we have a detailed guide on how to do this via API here, and these are the steps to do it using our dashboard.

  1. Move your cursor to the left menu and click your username. A pop-up will show up with a counter of checks made and options to change your language.
  2. Click API key from the pop-up. A list of API keys will be displayed.
  3. Click Create API key from the top right corner. A form will be displayed.
  4. Enter the Name, Version(Version 1 is recommended) and Billing Hub.
  5. Click Create. The API key will be shown. Make sure to copy it and keep it safe as it will not be displayed again.

Creating a flow

Once you have created an API key, you can create a Flow. Flows are a sequence of Identity Validations that will be included in your validation process. The order in which you enter them will be the order in which they appear to the user. Follow these steps to create a flow:

  1. Create a POST request to the Create Flow endpoint.
https://api.identity.truora.com/v1/flows
  1. Create a Header named Truora-API-Key and set its value to the API key you created.
  2. Create a Header named Content-Type and set its value to application/json.
  3. Set the Body to your flow in the following json format:
{
    "name":"<flow_name>",
       "theme": {
        "primary_color": "<color>",
        "company_logo_url": "<logo_url>"
    },
    "identity_verifications":[
        {
            "name": "<validation_1>"
        },
        {
            "name": "<validation_2>"
        }
    ]
}
  1. Replace <flow_name> with the name of your flow.
  2. Replace <color> with a hash followed by a hexadecimal representation of the color. (e.g., #CCCCCC).
  3. Replace <logo_url> with the url of the logo of your company.
  4. Replace <validation_1> and <validation_2> with the names of the validations. (i.e., enter_authorization, email_verification, phone_verification, document_verification, document_verification_with_face_recognition, and document_verification_with_liveness). Keep in mind that, if you are to define steps within your identity_verifications, any redirect_url added must be secure, meaning it must begin with https.
  5. Add as more validations as you need in the identity verifications parameter according to the json syntax previously defined.Keep in mind that you can have up to six validations and the order they are entered matches the order they will be shown to the final user
  6. Send the request. Copy the flow_id from the response, you will need it later to search or edit your flow.

Creating a Digital Identity API key (token)

After creating a flow, you need a Digital Identity API key or token to link the flow with your url and perform the validations. Follow these steps to create a DIgital Identity API key in Postman:

  1. Make a POST request to the Generate token endpoint.
https://api.account.truora.com/v1/api-keys
  1. Create a Header named Truora-API-Key and set its value to your API key.
  2. Create a Header named Content-Type and set its value to application/x-www-form-urlencoded.
  3. Create the following keys and set their respective values as follows:

    • key_name: api-key user name
    • key_type: web
    • grant: digital-identity
    • api_key_version: 1
    • country: the country where the validation is to be performed
    • redirect_url: url where the user is to be redirected once the validation is completed
    • flow_id: flow_id from flow creation
  4. Send the request. Copy the api_key from the response, you will need it later to perform the validation process by sending it to the URL https://identity.truora.com/?token=<api_key>.