All Products
Search
Document Center

Cloud Phone:CreateKeyPair

Last Updated:Dec 10, 2025

You can connect to Cloud Phones using the Android Debug Bridge (ADB). ADB lets you manage devices and applications, and transfer files. These operations require high permissions. Because Cloud Phones do not have physical interfaces, you cannot use a USB connection to trigger an authorization dialog box on the device. Therefore, you must configure a key pair before you connect to a Cloud Phone with ADB over a network. This key pair ensures that the device trusts the client and that all operations are secure. You can call the CreateKeyPair operation to create an ADB key pair. The system stores the public key and returns the private key. The private key is in PEM-encoded PKCS#8 format and complies with ADB connection standards. You must securely store the private key.

Operation description

You can also use the Android Debug Bridge (ADB) tool to create a key pair and then upload it to the Cloud Phone console by calling the ImportKeyPair operation. This key pair can be used in the same way as a key pair created by the system.

Each tenant can have a maximum of 500 key pairs.

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

KeyPairName

string

Yes

The name of the key pair. The name must be 2 to 128 characters in length. The name can contain letters, Chinese characters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter or a Chinese character and cannot start with http:// or https://.

testKeyPairName

Response elements

Element

Type

Description

Example

object

The response parameters.

Data

object

The returned data.

KeyPairId

string

The ID of the key pair.

kp-6v2q33ae4tw3*****

KeyPairName

string

The name of the key pair.

testKeyPairName

PrivateKeyBody

string

The private key of the key pair. The private key is PEM-encoded in PKCS#8 format and is compatible with ADB.

MIIEpAIBAAKCAQEAtReyMzLIcBH78EV2zj****

GmtCreated

string

The time when the key pair was created.

2024-06-30 08:45:09.0

RequestId

string

The ID of the request.

69BCBBE4-FCF2-59B8-AD9D-531EB422****

Examples

Success response

JSON format

{
  "Data": {
    "KeyPairId": "kp-6v2q33ae4tw3*****",
    "KeyPairName": "testKeyPairName",
    "PrivateKeyBody": "MIIEpAIBAAKCAQEAtReyMzLIcBH78EV2zj****",
    "GmtCreated": "2024-06-30 08:45:09.0"
  },
  "RequestId": "69BCBBE4-FCF2-59B8-AD9D-531EB422****"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.