Skip to content

Commit 3fe884a

Browse files
formatting and wording changes
1 parent 6251dfa commit 3fe884a

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

docs/sdks/sdk-ref-python.md

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ You can use the SDK for Python on the server side to facilitate the process of g
1515

1616
This SDK simplifies integration with UID2 for any DSPs or UID2 sharers who are using Python for their server-side coding. The following table shows the functions it supports.
1717

18-
| Encrypt Raw UID2 to UID2 Token for Sharing | Decrypt UID2 Token to Raw UID2 | Generate UID2 Token from DII | Refresh UID2 Token | Map DII to Raw UID2s | Monitor Rotated Salt Buckets |
18+
| Encrypt Raw UID2 to UID2 Token for Sharing | Decrypt UID2 Token to Raw UID2 | Generate UID2 Token from DII | Refresh UID2 Token | Map DII to Raw UID2s | Monitor Rotated Salt Buckets* |
1919
| :--- | :--- | :--- | :--- | :--- | :--- |
2020
| ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
2121

22+
*Only applicable to SDK versions referencing versions of the POST /identity/map endpoint prior to version 3.
23+
2224
## UID2 Account Setup
2325

2426
To integrate with UID2, you'll need to have a UID2 account. If you haven't yet created an account, first follow the steps described on the [Account Setup](../getting-started/gs-account-setup.md) page.
@@ -156,7 +158,7 @@ Decryption response codes, and their meanings, are shown in the following table.
156158

157159
`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.
158160

159-
#### Client-Server Integration
161+
### Client-Server Integration
160162

161163
If you're using client-server integration (see [Client-Server Integration Guide for JavaScript](../guides/integration-javascript-client-server.md)), follow this step:
162164

@@ -218,9 +220,10 @@ If you're using server-side integration (see [Publisher Integration Guide, Serve
218220

219221
There are two operations that apply to Advertisers/Data Providers:
220222
- [Map DII to Raw UID2s](#map-dii-to-raw-uid2s)
221-
- [Monitor rotated salt buckets](#monitor-rotated-salt-buckets)
223+
- [Monitor rotated salt buckets](#monitor-rotated-salt-buckets) (only applicable to versions of the POST /identity/map endpoint prior to version 3)
222224

223225
### Map DII to Raw UID2s
226+
To map DII to raw UIDs, follow these steps:
224227

225228
1. Create an IdentityMapV3Client as an instance variable:
226229
```py
@@ -264,7 +267,7 @@ There are two operations that apply to Advertisers/Data Providers:
264267
```
265268

266269
>**Note:** The SDK automatically handles email normalization and hashing, ensuring that raw email addresses and phone numbers do not leave your server.
267-
### Usage Example
270+
#### Usage Example
268271

269272
```py
270273
client = IdentityMapV3Client(UID2_BASE_URL, UID2_API_KEY, UID2_SECRET_KEY)
@@ -293,17 +296,18 @@ mixed_input = IdentityMapV3Input()
293296
mixed_response = client.generate_identity_map(mixed_input)
294297
```
295298

296-
## Migration From Older Identity Map Version
299+
### Migration From Earlier Identity Map Version
300+
The following sections provide information about the changes you'll need to make to upgrade from an earlier version of the SDK, that uses the POST /v2/identity/map endpoint, to the latest version, which uses the POST /v3/identity/map endpoint.
297301

298-
### Migration Overview
302+
#### Migration Overview
299303

300-
Improvements provided by the new Identity Map version:
304+
Improvements provided by the POST v3/identity/map endpoint:
301305
- **Support for Multiple Identity Types**: Process emails and phones in a single request
302306
- **Simpler refresh management**: Re-map on reaching refresh timestamps instead of monitoring salt buckets
303307
- **Previous raw UID2 availability**: You can see previous UID2 for 90 days after rotation
304308
- **Improved performance**: The new API uses significantly less bandwidth for the same amount of DIIs
305309

306-
### Required Changes
310+
#### Required Changes
307311

308312
1. **Update dependency version**:
309313
```bash
@@ -324,8 +328,8 @@ Improvements provided by the new Identity Map version:
324328
from uid2_client import IdentityMapV3Client, IdentityMapV3Input, IdentityMapV3Response, UnmappedIdentityReason
325329
```
326330

327-
### Recommended Changes
328-
331+
#### Recommended Changes
332+
To migrate from version 2 to version 3 of the POST /identity/map endpoint, follow these steps:
329333
1. **Update input construction**:
330334
```py
331335
# Before
@@ -365,14 +369,14 @@ Improvements provided by the new Identity Map version:
365369
unmapped = response.unmapped_identities.get("[email protected]")
366370
reason = unmapped.reason # Enum - OPTOUT, INVALID_IDENTIFIER, UNKNOWN
367371

368-
# Alternatively you can get reason as a string, values match the old ones
372+
# Alternatively, you can retrieve the reason as a string. Values match V2 unmapped values.
369373
raw_reason = unmapped.raw_reason
370374
```
371375

372-
## Previous Version (V2 Identity Map)
376+
### Previous Version (V2 Identity Map)
373377

374378
:::note
375-
The V2 Identity Map SDK is an older version maintained for backwards compatibility. Migrate to the current SDK for improved performance, multi-identity type support, and better UID rotation management.
379+
The V2 Identity Map SDK is an older version maintained for backwards compatibility. Migrate to the current SDK for improved performance, multi-identity type support, and better UID2 rotation management.
376380
New integrations should not use this version.
377381
See [Migration From Older Identity Map Version](#migration-from-older-identity-map-version) for instructions.
378382
:::
@@ -410,7 +414,7 @@ To map email addresses, phone numbers, or their respective hashes to their raw U
410414
reason = unmapped_identity.get_reason()
411415
```
412416

413-
### Monitor Rotated Salt Buckets
417+
#### Monitor Rotated Salt Buckets
414418

415419
To monitor salt buckets, follow these steps.
416420

0 commit comments

Comments
 (0)