All Products
Search
Document Center

Cloud Phone:SendFile

Last Updated:Nov 11, 2025

Sends files to cloud phones from Object Storage Service (OSS) or public download links.

Operation description

Currently, you can only send files or folders from OSS to cloud phones.

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

AndroidInstanceIdList

array

Yes

The list of instances.

string

No

The instance ID.

acp-34pqe4r0kd9kn****

SourceFilePath

string

Yes

The upload path within the cloud phone.

Note

If UploadType is set to OSS or OSS_BRIDGED, SourceFilePath must be a folder path within the cloud phone, such as /sdcard/Download. If UploadType is set to DOWNLOAD_URL, SourceFilePath must be a file path within the cloud phone, such as /sdcard/Download/MyFile.txt.

/sdcard/Download

UploadType

string

Yes

The storage class of the source file.

  • OSS The file is an OSS resource.

  • DOWNLOAD_URL The file is from a public download link.

  • OSS_BRIDGED The file is synchronized from a public download link to OSS and then distributed to cloud phone instances over the OSS internal network.

Valid values:

  • DOWNLOAD_URL :

    The public download link of the file.

  • OSS :

    The OSS file resource.

OSS

UploadEndpoint

string

No

The service endpoint for uploading the file to OSS. This parameter is required when UploadType is set to OSS or OSS_BRIDGED.

Note

If the cloud phone and the OSS bucket are in the same region, you can use an internal same-region endpoint to accelerate data transfer and avoid Internet traffic fees. For example, the internal endpoint for the China (Hangzhou) region is oss-cn-hangzhou-internal.aliyuncs.com. For more information, see OSS regions and endpoints.

oss-cn-hangzhou-internal.aliyuncs.com

UploadUrl

string

Yes

  • If UploadType is set to OSS, UploadUrl is the cloud address of the file in OSS.

Note

The name of the OSS bucket must start with the prefix "cloudphone-saved-bucket-", for example, "cloudphone-saved-bucket-example". You must also create an OSS folder to use as a backup folder. The format of UploadUrl is "oss://" + "Bucket name" + "/" + "Folder name" + "/" + "File name".

  • If UploadType is set to DOWNLOAD or OSS_BRIDGED, UploadUrl is the public download link of the file.

oss://cloudphone-saved-bucket-example/send/a.txt

TargetFileName

string

No

The name of the file after it is uploaded from OSS to the cloud phone.

Note

This parameter is optional when UploadType is set to OSS or OSS_BRIDGED. If you leave this parameter empty, the file retains its original name after being uploaded to the cloud phone. If you specify a value for this parameter, the file is renamed to the specified value after it is uploaded to the path specified by SourceFilePath. This parameter does not take effect when UploadType is set to DOWNLOAD_URL.

test.txt

AutoInstall

boolean

No

Specifies whether to automatically install the uploaded application.

true

Response elements

Element

Type

Description

Example

object

The response parameters.

Data

array<object>

The returned data.

425F351C-3F8E-5218-A520-B6311D0D****

object

The result object.

AndroidInstanceId

string

The instance ID.

acp-34pqe4r0kd9kn****

TaskId

string

The task ID.

t-4ks224ujixw****

RequestId

string

The unique ID of the request. If an error occurs, provide this ID for troubleshooting.

425F351C-3F8E-5218-A520-B6311D0D****

TaskId

string

The ID of the batch task.

t-ehs0yoedj0xe9****

Examples

Success response

JSON format

{
  "Data": [
    {
      "AndroidInstanceId": "acp-34pqe4r0kd9kn****",
      "TaskId": "t-4ks224ujixw****"
    }
  ],
  "RequestId": "425F351C-3F8E-5218-A520-B6311D0D****",
  "TaskId": "t-ehs0yoedj0xe9****"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.