GetLatestThirdAppAccessToken

Updated at:

Retrieves the current valid static access token for a specified user and a single cloud desktop under the current account, keeping the original expiration time.

Operation description

You must provide Resource and specify both ResourceType and ResourceId when calling this operation. Only a single cloud desktop is supported. You cannot omit Resource to authorize or query all cloud desktops.

AuthorizerId is the WyId of the user and cannot be replaced by a username. BusinessChannel supports Enterprise and Business. If omitted, the default value is Enterprise.

The AuthorizerId and Resource in the query conditions must be consistent with those used when the token was created. This operation only returns the current valid token for the current account, user, and cloud desktop. It does not create a new token, renew the token, or restore or roll back to a historical token. If no valid token is found, the token has expired, or the corresponding cache has been cleared, AccessToken.NotFound is returned. To obtain a new token, call CreateThirdAppAccessToken.

Keep the returned AccessToken secure and avoid displaying the full token in logs or public content.

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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

AuthorizerId

string

Yes

The WyId of the user used when the token was created. It must correspond to the current account and the target cloud desktop, and cannot be replaced by a username.

f1e2d3c4b5a6****

Resource

object

No

The convenience username under the current tenant. Used when AuthorizerId is not provided or is empty.

ResourceType

string

No

The resource type. This parameter is required. Valid value: DESKTOP, which indicates a cloud desktop. The value is case-insensitive.

DESKTOP

ResourceId

string

No

The ID of the cloud desktop specified when the token was created. You must provide a non-empty value that is consistent with the value used during creation. Asterisks (*) are not allowed.

ecd-7a8b9c0d****

BusinessChannel

string

No

The target single cloud desktop resource. You must provide this object along with ResourceType and ResourceId when calling this operation. Pass it as a JSON object to specify only one cloud desktop. Wildcards or authorization for all cloud desktops are not supported.

Enterprise

Pass Resource as a JSON object, for example: {"ResourceType":"DESKTOP","ResourceId":"ecd-7a8b9c0d****"}. The WyId, cloud desktop ID, and token in the example are masked display values. Replace them with valid values under the current account when making actual calls.

Response elements

Element

Type

Description

Example

object

The access token and expiration information returned when the call is successful.

RequestId

string

The unique identifier of the request. You can use it to locate and troubleshoot issues.

6DAB2D15-7345-4C33-9D77-48A1A756B9E1

AccessToken

string

The current valid static access token for the specified user and single cloud desktop. The original saved token is returned, and the query does not renew it. This is a sensitive credential. Do not log or expose the full value.

taatv1.v2****

ExpiresAt

integer

The absolute expiration time of the token, in UNIX milliseconds. This parameter is not empty when the call is successful. GetLatestThirdAppAccessToken returns the original expiration time and does not renew the token.

1795450500000

AccessToken is a sensitive credential. The example is masked and cannot be used. ExpiresAt is a synthetic UNIX millisecond timestamp example and does not represent the return value of an actual request.

Examples

Success response

JSON format

{
  "RequestId": "6DAB2D15-7345-4C33-9D77-48A1A756B9E1",
  "AccessToken": "taatv1.v2****",
  "ExpiresAt": 1795450500000
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.