From 9c5e07d27714d00ec882c91b4a25b7be0d74b06f Mon Sep 17 00:00:00 2001 From: sean wibisono Date: Mon, 9 Feb 2026 11:00:53 +1100 Subject: [PATCH 1/2] remove optout_check and deprecated SDK functions --- docs/endpoints/post-token-generate.md | 20 ++++++------------- .../gs-encryption-decryption.md | 16 +++++++-------- docs/getting-started/gs-faqs.md | 2 +- docs/getting-started/gs-opt-out.md | 2 +- docs/sdks/sdk-ref-java.md | 9 ++------- docs/sdks/sdk-ref-python.md | 2 +- 6 files changed, 19 insertions(+), 32 deletions(-) diff --git a/docs/endpoints/post-token-generate.md b/docs/endpoints/post-token-generate.md index d2240de62..51fab452c 100644 --- a/docs/endpoints/post-token-generate.md +++ b/docs/endpoints/post-token-generate.md @@ -15,9 +15,6 @@ Requests a UID2 token generated from a user's ' | python3 uid2_request.py Example: - echo '{"email": "test@example.com", "optout_check": 1}' | python3 uid2_request.py https://prod.uidapi.com/v2/token/generate PRODGwJ0hP19QU4hmpB64Y3fV2dAed8t/mupw3sjN5jNRFzg= wJ0hP19QU4hmpB64Y3fV2dAed8t/mupw3sjN5jNRFzg= - + echo '{"email": "test@example.com"}' | python3 uid2_request.py https://prod.uidapi.com/v2/token/generate PRODGwJ0hP19QU4hmpB64Y3fV2dAed8t/mupw3sjN5jNRFzg= wJ0hP19QU4hmpB64Y3fV2dAed8t/mupw3sjN5jNRFzg= + Refresh Token Usage: python3 uid2_request.py --refresh-token @@ -356,7 +356,7 @@ public class Uid2Request { + "java -jar Uid2Request-jar-with-dependencies.jar " + "\n\n" + "Example:" + "\n " - + "echo '{\"email\": \"test@example.com\", \"optout_check\": 1}' | java -jar Uid2Request-jar-with-dependencies.jar https://prod.uidapi.com/v2/token/generate PRODGwJ0hP19QU4hmpB64Y3fV2dAed8t/mupw3sjN5jNRFzg= wJ0hP19QU4hmpB64Y3fV2dAed8t/mupw3sjN5jNRFzg=" + "\n\n\n" + + "echo '{\"email\": \"test@example.com\"}' | java -jar Uid2Request-jar-with-dependencies.jar https://prod.uidapi.com/v2/token/generate PRODGwJ0hP19QU4hmpB64Y3fV2dAed8t/mupw3sjN5jNRFzg= wJ0hP19QU4hmpB64Y3fV2dAed8t/mupw3sjN5jNRFzg=" + "\n\n\n" + "Refresh Token Usage:" + "\n " + "java -jar Uid2Request-jar-with-dependencies.jar --refresh-token " + "\n\n" @@ -466,8 +466,8 @@ Usage: echo '' | .\uid2_request Example: - echo '{"email": "test@example.com", "optout_check": 1}' | .\uid2_request https://prod.uidapi.com/v2/token/generate UID2-C-L-999-fCXrMM.fsR3mDqAXELtWWMS+xG1s7RdgRTMqdOH2qaAo= wJ0hP19QU4hmpB64Y3fV2dAed8t/mupw3sjN5jNRFzg= - + echo '{"email": "test@example.com"}' | .\uid2_request https://prod.uidapi.com/v2/token/generate UID2-C-L-999-fCXrMM.fsR3mDqAXELtWWMS+xG1s7RdgRTMqdOH2qaAo= wJ0hP19QU4hmpB64Y3fV2dAed8t/mupw3sjN5jNRFzg= + Refresh Token Usage: .\uid2_request --refresh-token @@ -810,8 +810,8 @@ func printUsage() { echo '' | go run uid2_request.go Example: - echo '{"email": "test@example.com", "optout_check": 1}' | go run uid2_request.go https://prod.uidapi.com/v2/token/generate UID2-C-L-999-fCXrMM.fsR3mDqAXELtWWMS+xG1s7RdgRTMqdOH2qaAo= wJ0hP19QU4hmpB64Y3fV2dAed8t/mupw3sjN5jNRFzg= - + echo '{"email": "test@example.com"}' | go run uid2_request.go https://prod.uidapi.com/v2/token/generate UID2-C-L-999-fCXrMM.fsR3mDqAXELtWWMS+xG1s7RdgRTMqdOH2qaAo= wJ0hP19QU4hmpB64Y3fV2dAed8t/mupw3sjN5jNRFzg= + Refresh Token Usage: go run uid2_request.go --refresh-token diff --git a/docs/getting-started/gs-faqs.md b/docs/getting-started/gs-faqs.md index 96092f99e..addc47e1d 100644 --- a/docs/getting-started/gs-faqs.md +++ b/docs/getting-started/gs-faqs.md @@ -92,7 +92,7 @@ No, publishers do not need to decrypt directly identifying information (DII) to UID2 tokens for targeted advertising. - - - --> Always apply `doNotGenerateTokensForOptedOut()`. This applies a parameter similar to setting `optout_check=1` in the call to the POST /token/generate endpoint (see [Unencrypted JSON Body Parameters](../endpoints/post-token-generate.md#unencrypted-json-body-parameters)). ::: @@ -224,7 +222,7 @@ If you're using server-side integration (see [Publisher Integration Guide, Serve 2. Call a function that takes the user's email address or phone number as input and creates a secure request data envelope. See [Encrypting requests](../getting-started/gs-encryption-decryption.md#encrypting-requests). The following example uses an email address: ```java - EnvelopeV2 envelope = publisherUid2Helper.createEnvelopeForTokenGenerateRequest(TokenGenerateInput.fromEmail("user@example.com").doNotGenerateTokensForOptedOut()); + EnvelopeV2 envelope = publisherUid2Helper.createEnvelopeForTokenGenerateRequest(TokenGenerateInput.fromEmail("user@example.com")); ``` 3. Using an HTTP client library of your choice, post this envelope to the [POST token/generate](../endpoints/post-token-generate.md) endpoint, including headers and body: 1. Headers: Depending on your HTTP library, this might look something like the following: @@ -235,9 +233,6 @@ If you're using server-side integration (see [Publisher Integration Guide, Serve :::important Always apply `doNotGenerateTokensForOptedOut()`. This applies a parameter similar to setting `optout_check=1` in the call to the POST /token/generate endpoint (see [Unencrypted JSON Body Parameters](../endpoints/post-token-generate.md#unencrypted-json-body-parameters)). - ::: - 4. If the HTTP response status code is _not_ 200, see [Response Status Codes](../endpoints/post-token-generate.md#response-status-codes) to determine next steps. Otherwise, convert the UID2 identity response content into a `TokenGenerateResponse` object: diff --git a/docs/sdks/sdk-ref-python.md b/docs/sdks/sdk-ref-python.md index 49a297fb7..bf2edf03b 100644 --- a/docs/sdks/sdk-ref-python.md +++ b/docs/sdks/sdk-ref-python.md @@ -158,7 +158,7 @@ Decryption response codes, and their meanings, are shown in the following table. 2. Call a function that takes the user's email address or phone number as input and generates a `TokenGenerateResponse` object. The following example uses an email address: ```py - token_generate_response = client.generate_token(TokenGenerateInput.from_email("user@example.com").do_not_generate_tokens_for_opted_out()) + token_generate_response = client.generate_token(TokenGenerateInput.from_email("user@example.com")) ``` @@ -230,8 +230,10 @@ If you're using server-side integration (see [Publisher Integration Guide, Serve `.putHeader("Authorization", "Bearer " + UID2_API_KEY)` `.putHeader("X-UID2-Client-Version", PublisherUid2Helper.getVersionHttpHeader())` 2. Body: `envelope.getEnvelope()` - :::important - diff --git a/docs/sdks/sdk-ref-python.md b/docs/sdks/sdk-ref-python.md index bf2edf03b..5273afbdc 100644 --- a/docs/sdks/sdk-ref-python.md +++ b/docs/sdks/sdk-ref-python.md @@ -163,12 +163,10 @@ Decryption response codes, and their meanings, are shown in the following table. - `do_not_generate_tokens_for_opted_out()` applies `optout_check=1` in the [POST /token/generate](../endpoints/post-token-generate.md) call. Without this, `optout_check` is omitted to maintain backwards compatibility. - ### Client-Server Integration If you're using client-server integration (see [Client-Server Integration Guide for JavaScript](../guides/integration-javascript-client-server.md)), follow this step: