Skip to main content
POST
/
v1
/
w3s
/
users
/
token
/
refresh
Get a new userToken with the refreshToken
curl --request POST \
  --url https://api.circle.com/v1/w3s/users/token/refresh \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-User-Token: <x-user-token>' \
  --data '{
  "idempotencyKey": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
  "refreshToken": "eyJhbGciOiJSUz...kmqSVLDhiI-F8EFYDYjAxIUw",
  "deviceId": "018d7c79-6b79-71ec-8ad8-ebc2b57a4650"
}'
{
  "data": {
    "userToken": "eyJhbGciOiJS...-F8EFYDYjAxIUw",
    "encryptionKey": "7LcOsm4lUAK2Mg...+6fPjr58=",
    "userID": "ext_user_id",
    "refreshToken": "eyJhbGciOiJSUz...kmqSVLDhiI-F8EFYDYjAxIUw"
  }
}

Authorizations

Authorization
string
header
required

Circle's API Keys are formatted in the following structure "PREFIX:ID:SECRET". All three parts are requred to make a successful request.

Headers

X-User-Token
string
required

Unique system generated JWT session token for specific user.

X-Request-Id
string

Developer-provided parameter used to identify this request. Useful when communicating with Circle Support.

Example:

"2adba88e-9d63-44bc-b975-9b6ae3440dde"

Body

application/json

Request body

idempotencyKey
string<uuid>
required

Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests. To create a UUIDv4 go to uuidgenerator.net. If the same key is reused, it will be treated as the same request and the original response will be returned.

Example:

"a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11"

refreshToken
string
required

Use the refresh token passed from sdk/performLogin to get a new userToken. Each refreshToken has a corresponding userToken for verification purposes.

Example:

"eyJhbGciOiJSUz...kmqSVLDhiI-F8EFYDYjAxIUw"

deviceId
string
required

Get the device id from SDK, and the deviceToken is bound with this device id.

Example:

"018d7c79-6b79-71ec-8ad8-ebc2b57a4650"

Response

Successfully refreshed the user token.

data
object
required