Step 3: Get Country Codes

The GlobalGateway API is structured to make calls by country. Your organization's contract with Trulioo will outline what countries are available. If you're not sure what countries are configured for your account, use the GlobalGateway Get Country Codes to retrieve this information at any time. Simply call the endpoint and you will receive the full list of country codes available to your account.

Request

GET <<endpoint>>/configuration/v1/countrycodes/Identity Verification
Authorization: Basic ACCESS_TOKEN
//Example Username: JoeNapoli_API_Demo, Example Password: 05uZuPRCyPi!6
var truliooClient = new TruliooApiClient("JoeNapoli_API_Demo", "05uZuPRCyPi!6");
IEnumerable<string> e = await truliooClient.Configuration
    .GetCountryCodesAsync("Identity Verification");
//Example Username: JoeNapoli_API_Demo, Example Password: 05uZuPRCyPi!6
ApiClient apiClient = new ApiClient();
apiClient.setUsername("JoeNapoli_API_Demo");
apiClient.setPassword("05uZuPRCyPi!6");
ConfigurationApi configurationClient = new ConfigurationApi(apiClient);

//getCountryCodes
List<String> countryCodes = configurationClient.getCountryCodes("Identity Verification");

//getCountryCodesAsync
configurationClient.getCountryCodesAsync("Identity Verification", new ApiCallback<List<String>>() {
    @Override
    public void onFailure(ApiException e, int statusCode, Map<String, List<String>> responseHeaders) {
        Logger.getLogger(SdkJavaV1Sample.class.getName()).log(Level.SEVERE, null, e);
    }
    @Override
    public void onSuccess(List<String> result, int statusCode, Map<String, List<String>> responseHeaders) {
        System.out.println(result); //To change body of generated methods, choose Tools | Templates.
    }
    @Override
    public void onUploadProgress(long bytesWritten, long contentLength, boolean done) {
        //To change body of generated methods, choose Tools | Templates.
    }
    @Override
    public void onDownloadProgress(long bytesRead, long contentLength, boolean done) {
        //To change body of generated methods, choose Tools | Templates.
    }
});

🚧

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"
]

For a successful response you will receive a JSONArray of ISO 3166-1 alpha-2 country codes.