From c1af730a135d4af2c22e2c5ec6cc6587cc57cfe6 Mon Sep 17 00:00:00 2001 From: genwhittTTD Date: Thu, 7 Nov 2024 12:06:56 -0500 Subject: [PATCH 1/2] updates re token refresh recommended period --- docs/ref-info/ref-tokens.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/ref-info/ref-tokens.md b/docs/ref-info/ref-tokens.md index 98919dd52..8fd61fdbe 100644 --- a/docs/ref-info/ref-tokens.md +++ b/docs/ref-info/ref-tokens.md @@ -47,9 +47,14 @@ Here are some key points about refresh tokens: ### Recommended Token Refresh Frequency -The recommended refresh interval is hourly. +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 Unix timestamp, and the value is one hour from the time that the token was generated, expressed in milliseconds. ### Managing Token Refresh with an SDK From 0bf43d655f3a32f10c7dcb30399706c4c33014c8 Mon Sep 17 00:00:00 2001 From: genwhittTTD Date: Thu, 7 Nov 2024 18:04:35 -0500 Subject: [PATCH 2/2] edit from SW --- docs/ref-info/ref-tokens.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/ref-info/ref-tokens.md b/docs/ref-info/ref-tokens.md index 8fd61fdbe..33e0bb870 100644 --- a/docs/ref-info/ref-tokens.md +++ b/docs/ref-info/ref-tokens.md @@ -47,7 +47,7 @@ Here are some key points about refresh tokens: ### Recommended Token Refresh Frequency -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. +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 a call to one of the following UID2 API endpoints: @@ -56,6 +56,10 @@ To determine when to refresh, you can use the timestamp of the `refresh_from` fi The `refresh_from` field is a Unix 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 An easy way to manage token refresh is to use one of the UID2 SDKs that have a function for the purpose: either the Java or Python SDK.