All Products
Search
Document Center

Elastic Desktop Service:GetConnectionTicket

Last Updated:May 11, 2026

Obtains the credential that is used to connect to a cloud desktop.

Operation description

The cloud computer must be in the Running state. The ticket obtained by calling this operation will expire in 10 minutes.

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

ecd:GetConnectionTicket

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou

EndUserId

string

No

The ID of the end user of the cloud computer. The end user must be the current end user of the cloud computer.

alice

Password

string

No

The password of the current end user of the cloud computer.

Ab123456

TaskId

string

No

The ID of the cloud computer connection task.

2afbad19-778a-4fc5-9674-1f19c638****

DesktopId

string

No

The ID of the cloud computer for which you want to generate a connection credential. This parameter is required.

ecd-gx2x1dhsmucyy****

Uuid

string

No

The unique identifier of the client. If you use an Alibaba Cloud Workspace client, click About on the client logon page to view the identifier of the client.

28c80e90-f71e-4c23-93d6-1225329cf949

CommandContent

string

No

The command that you want to run to configure a custom application in user mode. After you obtain the credential, the application is automatically started. Parameter description in the command:

  • appPath: the path of the application startup file. Example: "C:\\Program Files (x86)\\000\\000.exe". Use double slashes (\) as the delimiter. Type of the parameter value: string.

  • appParameter: the startup arguments of the application. Example: "meetingid 000 meetingname aaa". Separate multiple arguments with spaces. Type of the parameter value: string.

{ "startApplication": { "startApplicationList": [ { "sessionName": "", "appList": [ { "appPath": "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe", "appParameter": "www.example.com www.example1.com" } ] } ] } }

Response elements

Element

Type

Description

Example

object

RequestId

string

The ID of the request.

1CBAFFAB-B697-4049-A9B1-67E1FC5F****

TaskStatus

string

The task status.

Valid values:

  • FAILED: The credential fails to be obtained.

  • RUNNING: The credential is being obtained.

  • FINISHED: The credential is obtained.

Valid values:

  • FAILED :
  • RUNNING :
  • FINISHED :

FINISHED

Ticket

string

The credentials for connecting to the cloud computer.

W0VuY29kaW5nXQ0KSW5wdXRFbmNvZGluZz1V********

TaskId

string

The ID of the cloud computer connection task.

2afbad19-778a-4fc5-9674-1f19c638****

TaskCode

string

Before you use the credential, you must Base64 decode the content of the credential, save the credential as an xxx.ica file, and then open the file. Python sample code:

import base64
response = {
    "Ticket": "W0VuY29kaW5nXQ0KSW5wdXRFbmNvZGluZz1V********",
    "RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****",
}
f = open ('xxx.ica', 'w')
out = base64.b64decode(response['Ticket'])
f.write(out)
f.close()

W0VuY29kaW5nXQ0KSW5wdXRFbmNvZGluZz1V********

TaskMessage

string

The ID of the connection task.

2afbad19-778a-4fc5-9674-1f19c638****

DesktopId

string

The ID of the cloud computer.

ecd-gx2x1dhsmucyy****

Examples

Success response

JSON format

{
  "RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****",
  "TaskStatus": "FINISHED",
  "Ticket": "W0VuY29kaW5nXQ0KSW5wdXRFbmNvZGluZz1V********",
  "TaskId": "2afbad19-778a-4fc5-9674-1f19c638****",
  "TaskCode": "W0VuY29kaW5nXQ0KSW5wdXRFbmNvZGluZz1V********",
  "TaskMessage": "2afbad19-778a-4fc5-9674-1f19c638****",
  "DesktopId": "ecd-gx2x1dhsmucyy****"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.