RefreshWebofficeToken

更新时间:
复制 MD 格式

Refreshes a Weboffice access token. Access tokens are valid for 30 minutes. After a token expires, call this operation to obtain a new one.

Operation description

Before you call this operation, make sure that you understand the pricing of Intelligent Media Management (IMM).

  • For billing details, refer to WebOffice billing.

  • The access token expires in 30 minutes. Start the preview before it expires. After expiration, previewing is unavailable.

  • The refresh token expires in 1 day. Refresh the token before it expires. After expiration, the token becomes invalid.

  • The returned expiration time is in UTC, which is 8 hours behind UTC+8.

Note

The access token grants preview session access. The refresh token lets you obtain a new access token with the same settings without re-specifying parameters.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

imm:RefreshWebofficeToken

none

*Project

acs:imm:{#regionId}:{#accountId}:project/{#ProjectName}

None None

Request parameters

Parameter

Type

Required

Description

Example

ProjectName

string

Yes

The name of the IMM project. For information about how to obtain the project name, see Create a project.

test-project

AccessToken

string

Yes

The Weboffice access token, obtained by calling GenerateWebofficeToken or RefreshWebofficeToken.

99d1b8b478b641c1b3372f5bd6********

RefreshToken

string

Yes

The Weboffice refresh token, obtained by calling GenerateWebofficeToken or RefreshWebofficeToken.

a730ae0d7c6a487d87c661d199********

CredentialConfig CredentialConfig

No

Leave this parameter empty unless you have special requirements.

The chained authorization configuration. For more information, see Use chained authorization to access resources of other entities.

Response elements

Element

Type

Description

Example

object

The Weboffice access token.

RequestId

string

The request ID.

501339F9-4B70-0CE2-AB8C-866C********

RefreshToken

string

The Weboffice refresh token.

72a52ab3702a4123ab5594671a********

AccessToken

string

The Weboffice access token.

4996466c690a4902846ce00f96********

RefreshTokenExpiredTime

string

The expiration time of the refresh token. Expires in 1 day. Format: ISO 8601 UTC timestamp with millisecond precision.

2021-09-01T12:37:28.950065359Z

AccessTokenExpiredTime

string

The expiration time of the access token. Expires in 30 minutes. Format: ISO 8601 UTC timestamp with millisecond precision.

2021-08-31T13:07:28.950065359Z

Examples

Success response

JSON format

{
  "RequestId": "501339F9-4B70-0CE2-AB8C-866C********",
  "RefreshToken": "72a52ab3702a4123ab5594671a********",
  "AccessToken": "4996466c690a4902846ce00f96********",
  "RefreshTokenExpiredTime": "2021-09-01T12:37:28.950065359Z",
  "AccessTokenExpiredTime": "2021-08-31T13:07:28.950065359Z"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.