RefreshJWTUserToken - Refresh JWT identity source token

更新时间:
复制 MD 格式

This topic describes the authorization information, request parameters, response parameters, and error codes for the RefreshNativeUserToken API.

Authorization information

The following table describes the authorization information for this API. Add this information to the Action element of a RAM access policy statement to grant a RAM user or RAM role the permissions to call this API. The columns are described as follows:

  • Operation: The specific permission.

  • Resource type: The type of resource that can be authorized for the operation. Note the following:

    • Required resource types are highlighted.

    • For operations that do not support resource-level authorization, this is set to All resources.

  • Condition key: The condition key defined by the cloud product.

  • Associated operation: Other permissions required to perform the operation. To successfully call this API, you must also have permissions for all associated operations.

Operation

Resource type

Condition key

Associated operation

mobilcdpdev:RefreshNativeUserToken

All resources

None

None

Request parameters

Name

Type

Required

Description

Example

WorkspaceId

String

Yes

The workspace ID.

171706276418746

RefreshToken

String

Yes

The refresh_token issued by Mobi.

eyJhbGciOiJIUzUxMiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI4O***

Warning

If a RAM user calls this API, you must first enable the required RAM permissions for Mobi. Then, contact the root account to grant workspace member permissions to the RAM user.

Response parameters

Name

Type

Description

Example

AccessToken

String

The access_token of the Mobi user.

eyJhbGciOiJIUzUxMiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI4O***

ExpiresIn

Integer

The time-to-live (TTL) of the access_token, in seconds.

300

RefreshToken

String

The refresh_token of the Mobi user.

eyJhbGciOiJIUzUxMiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI4O***

RefreshExpiresIn

Integer

The TTL of the refresh_token, in seconds.

300

TokenType

string

The token type.

Bearer

Scope

String

The scope included in the access_token.

profile

Example

Sample success response

{
	"RequestId": "97AB1310****CF7687B0C0A7",
	"Data": {
		"ExpiresIn": 300,
		"TokenType": "Bearer",
		"RefreshToken": "eyJhbGciOiJIUzUxMiIsInR...",
		"AccessToken": "eyJhbGciOiJSUzI1NiI...",
		"RefreshExpiresIn": 1800
	}
}

Error codes

HTTP status code

Error code

Error message

Description

400

User.NoPermission

No permission.

The user does not have access permissions for the specified workspace.