-
Notifications
You must be signed in to change notification settings - Fork 50
UID2-6592: Document UID2 token validator in integration guides #1001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
BehnamMozafari
wants to merge
11
commits into
main
Choose a base branch
from
bmz-UID2-6592-token-validator
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+99
−5
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
608693b
Add token validator reference page
BehnamMozafari 993d585
Add reference page to integration guides
BehnamMozafari 77911b2
Added reference to token validator in Normalization and Encoding page
BehnamMozafari 1a2d224
Removed reference to token validator from liveramp guide
BehnamMozafari 874040d
Copied over ref-token-validator.md to japanese folder to fix broken l…
BehnamMozafari 063d814
Address review comments
BehnamMozafari 5d4c139
Address review comments
BehnamMozafari 4c29e90
Address Gen's review comments
BehnamMozafari 7038637
Merge branch 'main' into bmz-UID2-6592-token-validator
BehnamMozafari a708b07
Link "Raw UID2" to glossary
BehnamMozafari b26145c
Address review comments
BehnamMozafari File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| --- | ||
| title: UID2 Token Validator | ||
| description: How to use the UID2 Token Validator to validate UID2 tokens against source DII and confirm that your token generation workflow is correct. | ||
| hide_table_of_contents: false | ||
| sidebar_position: 02 | ||
| displayed_sidebar: docs | ||
| --- | ||
|
|
||
| import Link from '@docusaurus/Link'; | ||
|
|
||
| # UID2 Token Validator | ||
|
|
||
| The [UID2 Token Validator](https://token-validator.uidapi.com/) is a web-based tool that validates <Link href="../ref-info/glossary-uid#gl-uid2-token">UID2 tokens</Link> against their source <Link href="../ref-info/glossary-uid#gl-dii">directly identifying information (DII)</Link> to confirm that your token generation process is correct. | ||
|
|
||
| ## Overview | ||
|
|
||
| Publishers who generate UID2 tokens by providing DII sometimes receive tokens that appear valid but are unusable in the UID2 ecosystem. This happens when the normalization or hashing steps are not performed correctly. Because UID2 uses the normalized and hashed form of DII to derive the token, an error in either step produces a <Link href="../ref-info/glossary-uid#gl-raw-uid2">raw UID2</Link> that is unique to that publisher. This mismatched raw UID2 will not correspond to the one used by other participants for the same DII, meaning the publisher's tokens will not match up with those from other publishers, data providers, or advertisers' CRM uploads. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| To use the UID2 Token Validator, you need: | ||
|
|
||
| - A **UID2 API Key** (Client Key) | ||
| - A **UID2 Client Secret** | ||
|
|
||
| If you do not have these, see [API Keys](../portal/api-keys.md) for instructions on creating them in the UID2 Portal. | ||
|
|
||
| ## Using the Token Validator | ||
|
|
||
| Enter your **API Key** (Client Key) and **Client Secret** in the fields at the top of the Token Validation section. | ||
|
|
||
| Select the **Operator** (environment) you want to validate against. For information about UID2 environments, see [Environments](../getting-started/gs-environments.md). | ||
|
|
||
| ### Validate a Single Token | ||
|
|
||
| 1. Under **Input Mode**, select **Single Validation**. | ||
| 2. In the **Identifier** field, enter the DII you used to generate the token. This can be: | ||
| - A raw email address | ||
| - A raw phone number | ||
| - A Base64-encoded email hash | ||
| - A Base64-encoded phone hash | ||
| 3. Select the identifier type that matches your input. | ||
| 4. In the **Token** field, paste the UID2 token you want to validate. | ||
| 5. Click **Validate Tokens**. | ||
|
|
||
| ### Validate Multiple Tokens (CSV) | ||
|
|
||
| To validate a batch of token-identifier pairs: | ||
|
|
||
| 1. Under **Input Mode**, select **CSV**. | ||
| 2. Prepare a CSV file with the following columns: | ||
| - `identifier`: The DII (raw email, raw phone, email hash, or phone hash). | ||
| - `identifier_type`: Either `email`, `phone`, `email_hash` or `phone_hash`. | ||
| - `token`: The UID2 token to validate. | ||
| 3. Upload the CSV file. | ||
| 4. Click **Validate Tokens**. | ||
|
|
||
| ## Interpret Validation Results | ||
|
|
||
| When you click **Validate Tokens**, the **Validation Results** table displays a row for each token-identifier pair, in the format shown in the following table. | ||
|
|
||
| | Column | Description | | ||
| |---|---| | ||
| | Identifier | The DII you entered. | | ||
| | Identifier Type | `email`, `phone`, `email_hash` or `phone_hash`. | | ||
| | Normalized Hash | The Base64-encoded SHA-256 hash of the normalized DII. | | ||
| | Token | The token you submitted. | | ||
| | Validation | The result of the validation. For details, see the following table. | | ||
|
|
||
| The **Validation** column reflects the response from the [POST /token/validate](../endpoints/post-token-validate.md) endpoint. | ||
|
|
||
| | Validation Result | Meaning | | ||
| |---|---| | ||
| | `Token matches identifier` | The token matches the provided DII. This means that the token was generated from the correct normalized hash. | | ||
| | `Failed: Token does not match identifier` | The token does not match the provided DII. The most likely cause is incorrect normalization or hashing. | | ||
| | `Failed: Invalid token` | The token is malformed and cannot be parsed. | | ||
| | `Failed: {"status":"unauthorized"}` | The API credentials provided are invalid or unauthorized. | | ||
|
|
||
| :::tip | ||
| If the result is **Failed: Token does not match identifier**, compare the **Normalized Hash** shown in the results with what your own implementation produced for the same DII. If they differ, the issue is in your normalization or hashing steps. For details, see [Normalization and Encoding](../getting-started/gs-normalization-encoding.md) and [Preparing Emails and Phone Numbers for Processing](ref-preparing-emails-and-phone-numbers-for-processing.md). | ||
| ::: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.