SDK Explorer

Refresh the user token.

Parameters
input
object
Required

Represents the input parameters for refreshing a user token.

option 1:
userId
string
Required

Unique system-generated identifier for the user.

deviceId
string
Required

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

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.

idempotencyKey
string

The optional idempotency key. An idempotency key is a unique identifier used to identify and handle duplicate requests in order to ensure idempotent behavior, where multiple identical requests have the same effect as a single request.

We will generate one if you do not provide it.

option 2:
userToken
string
Required

The JSON Web Token (JWT) representing the user.

deviceId
string
Required

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

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.

idempotencyKey
string

The optional idempotency key. An idempotency key is a unique identifier used to identify and handle duplicate requests in order to ensure idempotent behavior, where multiple identical requests have the same effect as a single request.

We will generate one if you do not provide it.

Responses
Example
1const response = await client.refreshUserToken({
2  userToken: 'dummy-user-token',
3  refreshToken: 'dummy-refresh-token',
4  deviceId: 'device-id',
5})
6console.log(response.data)
ResponseChoose an example
1{
2  "data": {
3    "userToken": "eyJhbGciOiJS...-F8EFYDYjAxIUw",
4    "encryptionKey": "7LcOsm4lUAK2Mg...+6fPjr58=",
5    "userID": "ext_user_id",
6    "refreshToken": "eyJhbGciOiJSUz...kmqSVLDhiI-F8EFYDYjAxIUw"
7  }
8}
Did this page help you?
© 2023-2025 Circle Technology Services, LLC. All rights reserved.