English
English
简体中文
Contact Us
Register
Log In
layoutIndex

Get the list of voice templates

Last Updated on : 2022-09-07 08:45:00download

Get the list of voice templates.

API address

GET: /v1.0/iot-03/msg-templates/voices

Request parameter

Parameter name Type IN Required Description
page_no Integer query false The page number. Query the first page if this parameter is not entered.
page_size Integer query false The page size. It is 10 by default if this parameter is not entered.
sort Integer query false Sort the results. 0: Sort by creation time in ascending order. 1: Sort by creation time in descending order. The results are sorted by creation time in descending order if this parameter is not entered.

Return parameter

Parameter name Type Description
result TemplatesListRes

Description of result

Parameter name Type Description
total Long The total number of template lists.
list List The list of templates.
has_more Boolean Whether there is a next page.

Description of has_more

Parameter name Type Description
template_id String Template ID.
name String The template name with 1 to 40 characters.
content String The template content with 1 to 60 characters.
status Integer The review status of the template. 0: The review is in progress. 1: Passed the review. 2: Failed to pass the review.

Request example

GET: /v1.0/iot-03/msg-templates/voices?page_no=1&page_size=10&sort=1

Return example

{ "result": { "list": [ { "content": "You are registering an account. The verification code is: ${code}, valid for 5 minutes.", "name": "The voice verification code", "template_id": "a5g41kn**", "status": 1 } ], "total": 1, "has_more": false }, "t": 1586153261345, "success": true }

Error code

For more information, see error code.