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 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:
- Create a
POST
request to the Create Flow endpoint.
https://api.identity.truora.com/v1/flows
- Create a Header named
Truora-API-Key
and set its value to the API key you created. - Create a Header named
Content-Type
and set its value toapplication/json
. - Set the Body to your flow in the following
json
format:
{
"name": "Config Test Duran",
"status": "enabled",
"identity_verifications": [
{
"step_id": "",
"name": "document_verification",
"config": {
"enable_file_upload": true,
"enable_file_upload_on_last_retry": false,
"retries": 2,
"allowed_document_types": [
{
"country": "PE",
"document_types": [
"national-id"
]
},
{
"country": "CL",
"document_types": [
"national-id"
]
}
]
},
"steps": [
{
"action_id": "IPA4988f0c22f2789927d5b08d9eca8d89d",
"type": "enter_document_type",
"verification_output": null,
"redirect_url": "",
"config": null,
"expected_inputs": [
{
"type": "select",
"value": "",
"name": "country",
"placeholder": "Ingresa el pais",
"description": "¿Cuál es el país de tu documento de identificación?",
"length": 0,
"read_only": false
},
{
"type": "select",
"value": "",
"name": "document_type",
"placeholder": "Selecciona el tipo de documento",
"description": "¿Cuál es el tipo de tu documento de identificación?",
"length": 0,
"read_only": false
}
],
"files_upload_urls": null,
"remaining_retries": 0,
"async_step": false
},
{
"action_id": "IPA7d773ecdae7b71671665a682f9209e11",
"type": "take_document_photo",
"verification_output": null,
"redirect_url": "",
"config": null,
"expected_inputs": null,
"files_upload_urls": [
{
"name": "document_front",
"url": "",
"description": "Envía una foto de la parte *delantera* de tu documento de identidad: en la imagen puedes ver un ejemplo de cómo debería visualizarse.\n\n¡Busca un lugar con luz para que la información sea legible y nítida! 📸"
},
{
"name": "document_back",
"url": "",
"description": "Envía una foto de la parte *trasera* de tu documento de identidad: en la imagen puedes ver un ejemplo de cómo debería visualizarse.\n\n¡Busca un lugar con luz para que la información sea legible y nítida! 📸"
}
],
"remaining_retries": 2,
"async_step": true
}
],
"if": null
}
]
}
- Replace
<flow_name>
with the name of your flow. - Replace
<color>
with a hash followed by a hexadecimal representation of the color. (e.g., #CCCCCC). - Replace
<logo_url>
with the url of the logo of your company. - 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
, anddocument_verification_with_liveness
). Keep in mind that, if you are to define steps within youridentity_verifications
, anyredirect_url
added must be secure, meaning it must begin withhttps
. - Add as more validations as you need in the
identity verifications
parameter according to thejson
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 - Send the request. Copy the
flow_id
from the response, you will need it later to search or edit your flow.