Skip to content

Commit

Permalink
Merge pull request #750 from IABTechLab/gwh-APIDOCS-2748-refresh-toke…
Browse files Browse the repository at this point in the history
…n-time-copy-mod

updates re token refresh recommended period
  • Loading branch information
genwhittTTD authored Nov 8, 2024
2 parents 3403272 + 0bf43d6 commit 6d25c50
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions docs/ref-info/ref-tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,18 @@ Here are some key points about refresh tokens:

### Recommended Token Refresh Frequency

The recommended refresh interval is hourly.
Currently, the recommended refresh interval is hourly. An hourly interval helps ensure that the token doesn't get close to being expired, and is ready to be sent to the bidstream. In addition, since user opt-out is checked before a new token is generated, this helps ensure that user opt-out preferences are implemented promptly.

To determine when to refresh, you can use the timestamp of the `refresh_from` field in the response to the [POST /token/generate](../endpoints/post-token-generate.md) endpoint (see [Successful Response](../endpoints/post-token-generate.md#successful-response)) or [POST /token/refresh](../endpoints/post-token-refresh.md) endpoint (see [Successful Response With Tokens](../endpoints/post-token-refresh.md#successful-response-with-tokens)). The value of this field is a timestamp in Unix time, expressed in milliseconds.
To determine when to refresh, you can use the timestamp of the `refresh_from` field in the response to a call to one of the following UID2 API endpoints:

- [POST /token/generate](../endpoints/post-token-generate.md) endpoint (see [Successful Response](../endpoints/post-token-generate.md#successful-response))
- [POST /token/refresh](../endpoints/post-token-refresh.md) endpoint (see [Successful Response With Tokens](../endpoints/post-token-refresh.md#successful-response-with-tokens))

The `refresh_from` field is a <a href="../ref-info/glossary-uid#gl-unix-time">Unix</a> timestamp, and the value is one hour from the time that the token was generated, expressed in milliseconds.

:::tip
The recommended refresh interval could change in the future. Rather than using a fixed value, it's best to calculate based on the `refresh_from` value.
:::

### Managing Token Refresh with an SDK

Expand Down

0 comments on commit 6d25c50

Please sign in to comment.