Download a Phone Template File

Gets the download URL of the original configuration file of a custom template. This API applies only to custom templates.

Request URL

GET {base_url}/uc-cautop/api/v1/phone-templates/{id}/download

Request parameters

Headers
Parameter Required Type Description
Authorization Yes String The access token used for authentication.

Format: Bearer {access_token}.

x-tenant-code No String The tenant name.
Note: You can obtain tenant name using the Query Tenants interface.
Path parameters
Parameter Required Type Description
id Yes String The ID of the custom template. You can obtain the ID using the Search Custom Phone Templates interface.

Response parameters

Parameter Type Description
requestId String The unique ID of the request, which can be used to quickly locate the request.
code String The HTTP status code of the request.
  • 200: Request succeeded.
  • Non-200 value: Request failed.
message String The status message of the request.
detailMessage String The detailed error information.

When the request is successful, this parameter returns empty.

result Object<Download_Result> The download URL of the template file.
Download_Result
Parameter Type Description
downloadUrl String The presigned download URL with a validity period, which the front end directly requests to download.
fileName String The original file name.

Example

Request example

GET /uc-cautop/api/v1/phone-templates/371100695713411072/download HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJkaXN0cmlidXRvcmV4YW1wbGVAb3V0bG9vay5jb20iLCJhcHBfa2V5Ijoic2xOdnQzaHc1NXB2Vm5HRlNhR2ZOVTNmMWxYQ3lpa08iLCJncmFudF90eXBlIjoib3BlbmFwaSIsImNsaWVudF9leHQiOnsiZGVzY3JpcHRpb24iOiLnrKzkuInmlrnlkIjkvZzkvJnkvLTlupTnlKgiLCJwYXJ0bmVyIjoi56S65L6L5ZCI5L2c5LyZ5Ly0In0sImNsaWVudF90eXBlIjoib3BlbmFwaSIsImV4cCI6MTc5MjU2NjA5OSwiaWF0IjoxNzkyNTQ0NDk5LCJqdGkiOiI3NjY2ZWU3Ny0zZTYwLTQxMGEtOTQyMy1hOTRlZmNlZjYwMjYiLCJjbGllbnRfaWQiOiJub3ZvLW9wZW4tcGxhdGZvcm0iLCJ1c2VyX2V4dCI6eyJyb2xlSWRzIjpbM10sInN0eXBlIjoiQURNSU4iLCJ0ZW5hbnRDb2RlIjpudWxsLCJ0eXBlIjoiUF9BQ0NPVU5UIiwidXNlcklkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJlbWFpbCI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInVzZXJuYW1lIjoiZGlzdHJpYnV0b3JleGFtcGxlQG91dGxvb2suY29tIiwidWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5Nn19.zQ5trUGZLZpONqSK-W4IYwft0hfjEAEQ1Yltse27gR0Wfec--msHIKXs3Ukvc9kKdU04IplkNgtjj_iHr31STcCdu_XAfU3E3A2AiNzkcd1f6jwIqs3_ZVOkQLLgwUkpRY_6vWkhOmwlyU8L4ue2n03eoYRU__IdHlECXTSh9P-QmPUWF2Sxti8zctDpA6QqeoSnIO5ChKHC8n8IG9k82HKfigG5SrFkD9MR6EOUjw3feqFH9mVJvuL61ZPYBhJ29hHo7hsgxDahs9s3p-A02J3zEQrsHDCFM4KtB-9wm8e1j26rl_cfC14BIxo0BeZLSAuAEVnEXwpVdSBEXOu9PA

Response example

HTTP/1.1 422
{
  "requestId": "24df46a6f0b3d3add80766fa6ea6543e",
  "code": "1530422003",
  "message": "VALIDATION_FAILED",
  "detailMessage": "template has no downloadable file (only custom templates have original files)",
  "result": null
}
Note:

The tested template is a basic template without an original configuration file, so the API returned 422 VALIDATION_FAILED with detailMessage "template has no...". A request for a custom template with a configuration file will return 2xx.