- Overview
- Contact Info
- Environment
- Authentication
- Email Normalization
- Encoding Query Parameter Values
- Encoding Email Hashes
- Response Structure and Status Codes
- Endpoints
- Integration Guides
- License
Learn more about Unified ID 2.0 here.
For access to UID2, contact the relevant team at The Trade Desk shown below. Contacting The Trade Desk for access is temporary. When the system moves to independent governance, the governing organizations will handle access requests.
If you are a... | Contact Email |
---|---|
App Developer Publisher |
[email protected] |
Agency Brand CDP Data Provider DSP SSP |
[email protected] |
All UID2 endpoints use the same base URL.
Environment | Base URL |
---|---|
Testing | https://integ.uidapi.com/v1 |
Production | https://prod.uidapi.com/v1 |
e.g. https://integ.uidapi.com/v1/token/generate
Authenticate to UID2 endpoints using a bearer token in the request's authorization header.
Authorization: Bearer YourTokenBV3tua4BXNw+HVUFpxLlGy8nWN6mtgMlIk=
When sending email addresses in a request, normalize email addresses prior to sending.
- Remove leading and trailing spaces.
- Convert all ASCII characters to lowercase.
For email accounts ending in gmail.com:
- Remove leading and trailing spaces.
- Convert all ASCII characters to lowercase.
- Remove
.
(ASCII code 46) from the username of the email address.[email protected]
normalizes to[email protected]
. - Remove
+
(ASCII code 43) and all subsequent characters from the username of the email address.[email protected]
normalizes to[email protected]
.
When passing query parameter values in with a request, ensure the query parameter value is URL-encoded. Use Javascript's encodeURIcomponent()
or your coding language's equivalent.
Email hashes are base64-encoded SHA256 hashes of the normalized email address.
Type | Example | Use |
---|---|---|
[email protected] |
||
SHA256 of email | b4c9a289323b21a01c3e940f150eb9b8c542587f1abfd8f0e1cc1ffc5e475514 |
|
base64-encoded SHA256 of email | tMmiiTI7IaAcPpQPFQ65uMVCWH8av9jw4cwf/F5HVRQ= |
Use this encoding for email_hash values sent in the request body. |
URL-encoded, base64-encoded SHA256 of email | tMmiiTI7IaAcPpQPFQ65uMVCWH8av9jw4cwf%2FF5HVRQ%3D |
Use this encoding for email_hash query parameter values. |
All endpoints return responses utilizing the following body and status messaging structure. The status
property may include endpoint-specific values. The message
property returns additional information for non-success
statuses.
{
"status": "success",
"body": {
"property": "propertyValue"
},
"message": "Descriptive message"
}
Status | HTTP Status Code | Additional Notes |
---|---|---|
success |
200 | |
optout |
200 | This status only returns for authorized requests. The user opted out. |
client_error |
400 | See the message field for more information about missing or invalid parameters. |
invalid_token |
400 | This status only returns for authorized requests. The request specified an invalid identity token. |
unauthorized |
401 | The request did not include a bearer token, included an invalid bearer token, or included a bearer token unauthorized to perform the requested action. |
Click here to view an endpoint listing.
Click here to view integration guides.
All work and artifacts are licensed under the Apache License, Version 2.0. See LICENSE for the full license text.