Create Account to link processes by user
The account identifies users in Truora’s system and is represented by the account_id. The account_id is a unique value assigned to each user, allowing for the distinction and access to information and processes.
You have three options to generate the account_id:
- Use your user ID as account_id
- Create an Account
- Use an account_id generate by Truora’s system
These options are explained in the following sections. Choose the one that best suits your needs or use case.
Use your user ID as account_id
If your user already has an identifier in your system, you can use it as the account_id in the Truora’s system. This option will create an empty account initially, but it allows you the flexibility to update or add data to the account at a later time as required.
- When generating the Web Token for your user processes or creating a Validation for your user, provide the user’s identifier in your system as the value for the account_id parameter. Please ensure to use the same account_id in all your user processes within the Truora’s system. This will help maintain consistency and association with the correct user account throughout the system.
Note:
- Only Account IDs following the regex pattern [a-zA-Z0-9_.-]+ are supported.
- If you want to do a Doc+Face flow or validation, we suggest adding a timestamp, or a random number that makes the account_id unique for each process or user validation.
Create an Account
This feature, in addition to providing you with an account_id, enables you to collect information from your users and store it within Truora’s system. This stored data can be utilized or accessed at your discretion, as per your requirements.
To create an account you must:
- Create a
POST
request to the endpoint:https://api.validations.truora.com/v1/accounts
. You can also refer to our API Reference. - Add the next headers
Truora-API-Key
:<api key>
Get an API keyContent-Type
:application/x-www-form-urlencoded
- Add the following
key : values
params in the requestbody
andx-www-form-urlencoded
format:email
: Person e-mail address.country
: Country where this person is located.document_type
: Person document type.document_number
: Person document number.first_name
: Person first name.last_name
: Person last name.document_expedition_date
: Person document issue date. RFC3339 format.phone_number
: Person phone number.facebook_user
: Person Facebook username.twitter_user
: Person Twitter username.
Note:
- Note that only Account IDs following the regex pattern [a-zA-Z0-9_.-]+ are supported.
- All parameters are optional. If not provided, an empty account will be created, and you can modify it later.
- Please save the account_id that will be provided by this request, as it will serve as the new identifier for your user in the Truora’s system. All identity-related processes performed on your user should be associated with this account_id.
Use an account_id generate by Truora’s system
This option will provide you with a unique and automatically generated account_id, which will create an empty account initially. However, you have the flexibility to update or add data to the account at a later time as needed.
- When generating the Web Token for your user processes or creating a Validation for your user, please leave the “account_id” parameter empty. This will prompt the system to provide you with an auto-generated account_id. Please save this generated account_id and use it in all your user processes within the Truora’s system.
Additional endpoints that may be of interest
Get Accounts
Allows you to retrieve all the accounts that have been created for all users in the system.
- Create a
GET
request to the endpoint:https://api.validations.truora.com/v1/accounts
. You can also refer to our API Reference. - Add the next headers
Truora-API-Key
:<api key>
Get an API keyContent-Type
:application/x-www-form-urlencoded
Get Account
Allows you to retrieve an account identified by the provided account_id.
- Create a
GET
request to the endpoint:https://api.validations.truora.com/v1/accounts/{{account_id}}
. You can also refer to our API Reference. - Add the next headers
Truora-API-Key
:<api key>
Get an API keyContent-Type
:application/x-www-form-urlencoded
Get Validations
Allows you to retrieve a list with all the validations performed on the account identified by the provided account_id.
- Create a
GET
request to the endpoint:https://api.validations.truora.com/v1/accounts/{{account_id}}/validations
. You can also refer to our API Reference. - Add the next headers
Truora-API-Key
:<api key>
Get an API keyContent-Type
:application/x-www-form-urlencoded
Get Processes
Allows you to search for processes based on the account_id or flow_id with which the processes were created.
- Create a
GET
request to the endpoint:https://api.identity.truora.com/v1/processes/
. You can also refer to our API Reference. - Add the next headers
Truora-API-Key
:<api key>
Get an API keyContent-Type
:application/x-www-form-urlencoded
- Add the next query-string parameters
account_id
: Account ID used to create process