You can call this operation to query all SMS templates under your account and view their details, such as the review status, type, and content.
Operation description
This operation queries the details of all templates under your account. To query additional information, such as template variables or uploaded files, you can call the GetSmsTemplate operation to query the review details of a single template by its template code.
You can also view the details of all templates under your account on the Template Management page in the Short Message Service console.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dysms:QuerySmsTemplateList |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| PageIndex |
integer |
No |
The page number. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of templates to return on each page. Valid values: 1 to 50. Default value: 10. |
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. Alibaba Cloud generates a unique ID for each request. You can use this ID to troubleshoot issues. |
819BE656-D2E0-4858-8B21-B2E47708**** |
| Code |
string |
The status code of the request.
|
OK |
| Message |
string |
The description of the status code. |
OK |
| SmsTemplateList |
array<object> |
The list of results. |
|
|
array<object> |
The details of a single template. |
||
| TemplateCode |
string |
The code of the SMS template. |
SMS_1525*** |
| TemplateName |
string |
The name of the SMS template. |
验证码模板 |
| OuterTemplateType |
integer |
The type of the template. This parameter is for external use. Valid values:
|
0 |
| AuditStatus |
string |
The review status of the template. Valid values:
|
AUDIT_STATE_PASS |
| TemplateContent |
string |
The content of the template. |
验证码为:${code},您正在注册成为平台会员,感谢您的支持! |
| CreateDate |
string |
The time when the template was created. The format is yyyy-MM-dd HH:mm:ss. |
2020-06-04 11:42:17 |
| Reason |
object |
The review response. |
|
| RejectDate |
string |
The time when the template was rejected. The format is yyyy-MM-dd HH:mm:ss. |
2020-06-04 16:01:17 |
| RejectInfo |
string |
The reason for the rejection. |
变量不符合规范 |
| RejectSubInfo |
string |
The detailed description of the rejection reason. |
变量属性选择错误。 请根据业务使用场景选择合适的变量属性。 |
| OrderId |
string |
The ticket ID. Reviewers use this parameter to query review details. Provide this ticket ID to request an expedited review. |
2004983**** |
| TemplateType |
integer |
The type of the template. Valid values:
|
2 |
| SignatureName |
string |
The name of the associated signature. |
阿里云 |
| TotalCount |
integer |
The total number of templates returned. |
100 |
| CurrentPage |
integer |
The page number of the returned page. Default value: 1. |
1 |
| PageSize |
integer |
The number of templates returned per page. Valid values: 1 to 50. |
10 |
Examples
Success response
JSON format
{
"RequestId": "819BE656-D2E0-4858-8B21-B2E47708****",
"Code": "OK",
"Message": "OK",
"SmsTemplateList": [
{
"TemplateCode": "SMS_1525***",
"TemplateName": "验证码模板",
"OuterTemplateType": 0,
"AuditStatus": "AUDIT_STATE_PASS",
"TemplateContent": "验证码为:${code},您正在注册成为平台会员,感谢您的支持!",
"CreateDate": "2020-06-04 11:42:17",
"Reason": {
"RejectDate": "2020-06-04 16:01:17",
"RejectInfo": "变量不符合规范",
"RejectSubInfo": "变量属性选择错误。\n请根据业务使用场景选择合适的变量属性。"
},
"OrderId": "2004983****",
"TemplateType": 2,
"SignatureName": "阿里云"
}
],
"TotalCount": 100,
"CurrentPage": 1,
"PageSize": 10
}
Error codes
See for a complete list.
Release notes
See Release Notes for a complete list.