Every time you make a call to verify an identity, you need to include a country code. There are several reasons for this:
-
Different countries may have different expected format for the same fields. For example, a national ID number is formatted differently in the United States than in India.
-
This allows multinational organizations to enforce different verification rules across different countries, based on legal requirements, and to ensure it only verifies identities based on local datasources. For example: An online retailer that operates across all of Europe will want to verify customers on the German version of its website against German datasources, Spanish customers against Spanish datasources, and so on, and it may have different requirements for Germany than it does in Spain.
If you are building out an HTML form for Identity Verification from scratch, we recommended that you call Get Country Codes every time a user loads the page, than hardcoding the list into your application. This means that any updates to your account configuration will be reflected automatically, without incurring extra development cost. GetCountryCodes
returns a list of ISO 2 country codes, as shown in the response below:
Request
GET <<endpoint>>/configuration/v1/countrycodes/Identity%20Verification
Authorization: Basic ACCESS_TOKEN
Important:
Trulioo provides multiple global and regional endpoints. Please choose the correct endpoint based on your business use case and your regulatory and compliance requirements. See the full list here.
Response
[
"AU",
"CA",
"CN",
"IN",
"US",
"GB",
"IT",
"MY",
"NZ",
"BE"
]
List of Countries 🌍
The API from Trulioo supports a large number of datasources all over the world. To add more countries to your account, please contact the Trulioo Sales Team.
Depending on the web framework you're using, you should be able to write some code and populate an HTML <select>
, with each <option>
being one of the country codes retrieved from Trulioo. For a good user experience, it is recommended to map each country code to the full country name (["AU":"Australia", "CA": "Canada",...]) as in the following:
<form>
<select name="countries">
<option value="AU">Australia</option>
<option value="CA">Canada</option>
<option value="CN">China</option>
.
.
.
<option value="BE">Belgium</option>
</select>
<input type="submit" value="Submit">
</form>
You can now pick a country from the list and, if necessary, click submit. Based on the selected country code you can dynamically build a form for that country and gather the data needed for a verification.