Tracking Credential and Session across Multiple API Calls

Enable rich reporting for Verify API

If you are using the AXN Verify API, the best practice is to track both the session and the credential across all API interactions for a unique user journey.

This will allow you to:

  • a) associate transactions with a unique user in reporting
  • b) consolidate multiple API calls into a single, visualizable session in reporting

Tracking users across multiple API calls

To track users, you will need to send in the credential field to every API interaction with ID DataWeb. The value of credential is anything you'd like to use to uniquely identify the user in ID DataWeb reporting and billing. Some customers choose an identifying value like email address, others may choose a GUID or similar ID for system identification for privacy purposes.

Input:

{
  	"apikey":"12345",
	  "credential": "[email protected]",
	//other IDW Input
  ]
}

As a result, the API interaction will show up with the credential field populated in reporting.

Note - If you use multiple credential across API calls, the system will track the last used credential for reporting.

Tracking sessions across multiple API endpoint interactions

Most ID DataWeb interactions require multiple API calls to verify a user. A simple example would be - an /slverify call to verify PII, then an /otp call to confirm phone possession. It is important to link these two calls together into a single session, so that you can properly visualize user journeys in our reporting console. To do this - you can use the same session ID across multiple API calls.

For your first API call for a session to ID DataWeb, retrieve the transaction_id from the output.

ID DataWeb Output:

{
	"errorCode": "",
	"errorDescription": "",
	"transaction_id": "76ceb32b-yyyy-xxxx-zzzz-55e54bf93fc3",
    ///other IDW output 
}

For all subsequent API calls for this session, set the transaction_id value from the output of the first API call as the asi value for your input.

All subsequent API call inputs:

{
    "asi": "76ceb32b-yyyy-xxxx-zzzz-55e54bf93fc3",
  	"apikey":"12345",
	//other IDW Input
  ]
}

As a result, multiple API calls can be associated with the same ASI (transaction_id.) This will then reflect in reporting, billing and analytics via AXN Admin.

Example

Let's assume we are doing a simple MobileMatch interaction., which requires PII validation and an OTP call to verify phone possession. Here is how the above requirements would be implemented:

  • Call /token to retrieve an access token to support additional API calls.
  • For your first /slverify call, send the credential field in per the format above.
  • In the ID DataWeb output, retrieve the transaction_id
  • In the subsequent /otp API call, include:
    -- The transaction_id value as the asi input per the format above
    -- The credential of the user (same value as /slverify)

You can apply the above pattern to any API interactions with ID DataWeb.