User Verification Service

App providers can use the User Verification service to confirm that the correct (paying) customer is signing in to the App. This confirmation takes place via two steps:

  1. The API makes a POST call to generate a verification token when the user launches an app within the UI. Verification tokens expire after two minutes for security purposes.
  2. The app makes a GET call using the verification token that is sent by Xandr when the app is launched to retrieve the user's ID. Once the verification token has been used to return a user ID the token will be deleted for security purposes.

REST API

Create a new verification token:
POST https://api.appnexus.com/user-verification

Retrieve the user ID associated with a verification token:
GET https://api.appnexus.com/user-verification?user_token=USER_TOKEN

JSON Fields

Field

Type

Description

user_token

string

The authentication token that can be used to retrieve a user's ID.

user_id

int

The ID of the user that generated the user_token on POST.

Examples

Create a new verification token
{code}
$ curl -b cookies -c cookies -X POST 'http://api.adnxs.com/user-verification'

{
  "response": {
    "status": "OK",
    "user_token": "3e3088b48c901a6b26dc95e530bc5a8c96b8f7e4d6ba46cf"
  }
}
{code}
Retrieve the user ID associated with a token
{code}
$ curl -b cookies -c cookies 'http://api.adnxs.com/user-verification?user_token=3e3088b48c901a6b26dc95e530bc5a8c96b8f7e4d6ba46cf'

{
  "response": {
    "status": "OK",
    "user_id": 110,
  }
}
{code}