Refresh the user token.
Represents the input parameters for refreshing a user token.
Unique system-generated identifier for the user.
Get the device id from SDK, and the deviceToken is bound with this device id.
Use the refresh token passed from sdk/performLogin to get a new userToken. Each refreshToken has a corresponding userToken for verification purposes.
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.
The JSON Web Token (JWT) representing the user.
Get the device id from SDK, and the deviceToken is bound with this device id.
Use the refresh token passed from sdk/performLogin to get a new userToken. Each refreshToken has a corresponding userToken for verification purposes.
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.
1const response = await client.refreshUserToken({
2 userToken: 'dummy-user-token',
3 refreshToken: 'dummy-refresh-token',
4 deviceId: 'device-id',
5})
6console.log(response.data)
1{
2 "data": {
3 "userToken": "eyJhbGciOiJS...-F8EFYDYjAxIUw",
4 "encryptionKey": "7LcOsm4lUAK2Mg...+6fPjr58=",
5 "userID": "ext_user_id",
6 "refreshToken": "eyJhbGciOiJSUz...kmqSVLDhiI-F8EFYDYjAxIUw"
7 }
8}