UID2 API Documentation > v1 > Endpoints > GET /token/validate
Validate that an advertising token matches the provided email or email hash. This is primarily used for testing and troubleshooting new integrations and is not a primary step in the publisher workflow.
The only accepted email or email hash for this endpoint is [email protected]
.
GET '{environment}/{version}/token/validate?{queryParameter1}={queryParameterValue1}&{queryParameter2}={queryParameterValue2}'
Query Parameter | Data Type | Attributes | Description |
---|---|---|---|
token |
string |
? | The advertising_token obtained from GET /token/generate. |
email |
string |
Conditionally Required | The normalized email address of a user. Required when email_hash is not included in the request. |
email_hash |
string |
Conditionally Required | The URL-encoded, base64-encoded SHA256 hash of the normalized email address of a user. Required when email is not included in the request. |
curl -L -X GET 'https://integ.uidapi.com/v1/token/validate?token=AdvertisingTokenmZ4dZgeuXXl6DhoXqbRXQbHlHhA96leN94U1uavZVspwKXlfWETZ3b%2FbesPFFvJxNLLySg4QEYHUAiyUrNncgnm7ppu0mi6wU2CW6hssiuEkKfstbo9XWgRUbWNTM%2BewMzXXM8G9j8Q%3D&[email protected]' -H 'Authorization: Bearer YourTokenBV3tua4BXNw+HVUFpxLlGy8nWN6mtgMlIk='
curl -L -X GET 'https://integ.uidapi.com/v1/token/validate?token=AdvertisingTokenmZ4dZgeuXXl6DhoXqbRXQbHlHhA96leN94U1uavZVspwKXlfWETZ3b%2FbesPFFvJxNLLySg4QEYHUAiyUrNncgnm7ppu0mi6wU2CW6hssiuEkKfstbo9XWgRUbWNTM%2BewMzXXM8G9j8Q%3D&email_hash=eVvLS%2FVg%2BYZ6%2Bz3i0NOpSXYyQAfEXqCZ7BTpAjFUBUc%3D' -H 'Authorization: Bearer YourTokenBV3tua4BXNw+HVUFpxLlGy8nWN6mtgMlIk='
The response is a JSON object.
{
"body": true,
"status": "success"
}
Property | Data Type | Description |
---|---|---|
body |
boolean |
A value of true indicates that the email or the email_hash specified in the request is the same as the email or email_hash used to create the advertising_token .A value of false indicates an invalid token or that the email or the email_hash specified in the request is not the same as the email or email_hash used to create the advertising_token . |