All Products
Search
Document Center

Drive and Photo Service:GetDownloadUrl

Last Updated:Feb 26, 2026

Obtains a download URL for a file.

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 syntax

POST /v2/file/get_download_url HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

Request body parameters.

share_id

string

No

Share ID. If you access the file through a share, include the x-share-token header for authentication and provide this field. In that case, the drive_id field is ignored. Otherwise, use aksk or access_token for authentication and provide the drive_id field. You must specify either share_id or drive_id.

7JQX1FswpQ8

drive_id

string

No

Drive ID.

1

file_id

string

Yes

File ID.

9520943DC264

file_name

string

No

File name. Maximum length: 1024 characters.

1.txt

expire_sec

integer

No

Time-to-live (TTL) of the download URL, in seconds. Maximum value: 115200. Default value: 900.

100

response_content_type

string

No

video/mp4

Response elements

Element

Type

Description

Example

object

Response schema.

url

string

Public download URL. When intelligent data endpoints are enabled, Alibaba Cloud selects the optimal network line based on the client’s network conditions and returns the corresponding domain name.

https://data.aliyunpds.com/hz22%2F5d79219b0aa9a7c995a94a96993ba3205cd91c5a%2F5d79219bf3261a5d38744da0834ed489b677a27a?Expires=xxxOSSAccessKeyId=xxx&Signature=xxx&response-content-disposition=attachment%3Bfilename%3DtBiZAoJPC2c8b13450eda4292b7f5f8010618e078.txt

internal_url

string

VPC download URL. This field is not used when intelligent data endpoints are enabled. Instead, the response adapts automatically and returns the VPC URL in the url field. Contact PDS technical support to use this field.

https://data-vpc.aliyunpds.com/hz22%2F5d79219b0aa9a7c995a94a96993ba3205cd91c5a%2F5d79219bf3261a5d38744da0834ed489b677a27a?Expires=xxxOSSAccessKeyId=xxx&Signature=xxx&response-content-disposition=attachment%3Bfilename%3DtBiZAoJPC2c8b13450eda4292b7f5f8010618e078.txt

cdn_url

string

CDN download URL. This field is not used when intelligent data endpoints are enabled. Instead, the response adapts automatically and returns the CDN URL in the url field. Contact PDS technical support to use this field.

https://data-cdn.aliyunpds.com/hz22%2F5d79219b0aa9a7c995a94a96993ba3205cd91c5a%2F5d79219bf3261a5d38744da0834ed489b677a27a?Expires=xxxOSSAccessKeyId=xxx&Signature=xxx&response-content-disposition=attachment%3Bfilename%3DtBiZAoJPC2c8b13450eda4292b7f5f8010618e078.txt

expiration

string

Expiration time of the download URL.

2022-01-02T15:04:05.999Z07:00

size

integer

File size, in bytes.

10

crc64_hash

string

CRC64 hash value.

5498595269368962671

content_hash

string

Content hash of the file.

EA4942AA8761213890A5C386F88E6464D2C31CA1

content_hash_name

string

Name of the content hash algorithm.

sha1

Examples

Success response

JSON format

{
  "url": "https://data.aliyunpds.com/hz22%2F5d79219b0aa9a7c995a94a96993ba3205cd91c5a%2F5d79219bf3261a5d38744da0834ed489b677a27a?Expires=xxxOSSAccessKeyId=xxx&Signature=xxx&response-content-disposition=attachment%3Bfilename%3DtBiZAoJPC2c8b13450eda4292b7f5f8010618e078.txt",
  "internal_url": "https://data-vpc.aliyunpds.com/hz22%2F5d79219b0aa9a7c995a94a96993ba3205cd91c5a%2F5d79219bf3261a5d38744da0834ed489b677a27a?Expires=xxxOSSAccessKeyId=xxx&Signature=xxx&response-content-disposition=attachment%3Bfilename%3DtBiZAoJPC2c8b13450eda4292b7f5f8010618e078.txt",
  "cdn_url": "https://data-cdn.aliyunpds.com/hz22%2F5d79219b0aa9a7c995a94a96993ba3205cd91c5a%2F5d79219bf3261a5d38744da0834ed489b677a27a?Expires=xxxOSSAccessKeyId=xxx&Signature=xxx&response-content-disposition=attachment%3Bfilename%3DtBiZAoJPC2c8b13450eda4292b7f5f8010618e078.txt",
  "expiration": "2022-01-02T15:04:05.999Z07:00",
  "size": 10,
  "crc64_hash": "5498595269368962671",
  "content_hash": "EA4942AA8761213890A5C386F88E6464D2C31CA1",
  "content_hash_name": "sha1"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.