From a7de96a84950ecaaf8c78d20ebcf32580e19fd75 Mon Sep 17 00:00:00 2001 From: samin rahman Date: Mon, 19 Oct 2026 14:30:38 +1100 Subject: [PATCH 1/2] UID2-6366: Add curl example to token/refresh --- docs/endpoints/post-token-refresh.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/endpoints/post-token-refresh.md b/docs/endpoints/post-token-refresh.md index c56eac1ac..192ae0da1 100644 --- a/docs/endpoints/post-token-refresh.md +++ b/docs/endpoints/post-token-refresh.md @@ -48,7 +48,25 @@ Using either of the following parameters in a [POST /token/generate](post-t ### Request example -For details, and code examples in different programming languages, see [Encrypting requests and decrypting responses](../getting-started/gs-encryption-decryption.md). +The following example refreshes a token with `curl`. Replace `{environment}` with the base URL for your environment, and `{refresh_token}` with the `refresh_token` value from the previous [POST /token/generate](post-token-generate.md) or `POST /token/refresh` response: + +```sh +curl -X POST '{environment}/v2/token/refresh' -d '{refresh_token}' +``` + +For example, using the integration environment: + +```sh +curl -X POST 'https://operator-integ.uidapi.com/v2/token/refresh' -d 'AAAAAxxx...refresh-token...xxx=' +``` + +Notes: + +- The request needs no `Authorization` header (API key) and no encrypted request envelope. The POST body is the refresh token only, not JSON. +- A successful response (HTTP status code 200) is a base64-encoded encrypted string, so `curl` cannot show you its contents. To decrypt it, use the `refresh_response_key` value that was returned with the refresh token. See [Encrypting requests and decrypting responses](../getting-started/gs-encryption-decryption.md). +- An error response (for example, HTTP status code 400) is not encrypted, so `curl` shows the error. A 200 status code confirms that the operator is reachable and accepted the refresh token, even if you do not decrypt the response. + +For code examples in different programming languages, see [Encrypting requests and decrypting responses](../getting-started/gs-encryption-decryption.md). ## Decrypted JSON response format From c324964b1c7c07cb9e4b23bc457d4f9995373068 Mon Sep 17 00:00:00 2001 From: samin rahman Date: Mon, 19 Oct 2026 14:41:00 +1100 Subject: [PATCH 2/2] UID2-6980: Real looking refresh token --- docs/endpoints/post-token-refresh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/endpoints/post-token-refresh.md b/docs/endpoints/post-token-refresh.md index 192ae0da1..8dc8248de 100644 --- a/docs/endpoints/post-token-refresh.md +++ b/docs/endpoints/post-token-refresh.md @@ -57,7 +57,7 @@ curl -X POST '{environment}/v2/token/refresh' -d '{refresh_token}' For example, using the integration environment: ```sh -curl -X POST 'https://operator-integ.uidapi.com/v2/token/refresh' -d 'AAAAAxxx...refresh-token...xxx=' +curl -X POST 'https://operator-integ.uidapi.com/v2/token/refresh' -d 'AAAAAGYzgUszke2sV9CxXnxyFfUU+KDCJUCXNbj1/FVcCjvR7K07jYaWe44wxM6SOTwG7WQB4XfIcquMqH57iHUnAu1zacYf9g58BtbhKCYWTwrdpB0fSqTANBXOYy+yBnl6tLRwVv32LqRCj76D8meO4tw+MKlUAc2EoFzFNPSfZLpA3Jk4q68vH6VJH/WIuu1tulrVm5J8RZAZnmTlEcsPdjoOC6X4w3aAwiwtbeGw7yOO0immpVoC5KaXnT9olRPTlrt8F9SvebLIcqkYhvRMPpl1S89yeneyGo++RnD9qSHIrfu9To3VwYW018QuvyA15uv4No4BoAzyPuHqzQ8gAs6csWwZ7VwfYD7DSJXlQiIpwzjA2Hl8mgg/5fcXwKEJ' ``` Notes: