Skip to content

Commit f0c59c6

Browse files
authored
Merge pull request #20 from IABTechLab/ian-UID2-2203-deprecate-optout_check-0
add warning about removing support for policy=0
2 parents 93bbc24 + cbaf472 commit f0c59c6

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ print(decrypted_token.uid2)
5757

5858
>IMPORTANT: Be sure to call this function only when you have obtained legal basis to convert the user’s [directly identifying information (DII)](https://unifiedid.com/docs/ref-info/glossary-uid#gl-dii) to UID2 tokens for targeted advertising.
5959
60-
>`do_not_generate_tokens_for_opted_out()` applies `policy=1` in the [/token/generate](https://unifiedid.com/docs/endpoints/post-token-generate#token-generation-policy) call. Without this, `policy` is omitted to maintain backwards compatibility.
60+
>IMPORTANT: Always apply `do_not_generate_tokens_for_opted_out()`. This applies `policy=1` in the [/token/generate](https://unifiedid.com/docs/endpoints/post-token-generate#token-generation-policy) call. Support for `policy=0` will be removed soon.
6161
6262
### Standard Integration
6363

examples/sample_token_generate_refresh.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def _usage():
2121

2222
print("Generating Token")
2323
try:
24+
# Always use .do_not_generate_tokens_for_opted_out(), which applies policy=1. Support for policy=0 will be removed soon.
2425
token_generate_response = publisher_client.generate_token(TokenGenerateInput.from_email("[email protected]").do_not_generate_tokens_for_opted_out())
2526
except Exception as e:
2627
print(e)

uid2_client/token_generate_input.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def do_not_hash(self):
3636
self.need_hash = False
3737
return self
3838

39+
# Always use .do_not_generate_tokens_for_opted_out(), which applies policy=1. Support for policy=0 will be removed soon.
3940
def do_not_generate_tokens_for_opted_out(self):
4041
self.generate_for_opted_out = False
4142
return self

0 commit comments

Comments
 (0)