This API has been deprecated.
This API has been deprecated. We recommend migrating to Dysmsapi(2017-05-25) - GetSmsTemplate for enhanced functionality and continued support. While the deprecated API remains temporarily accessible, no further updates or bug fixes will be provided.
Operation description
-
Alibaba Cloud has updated its template-related APIs to comply with regulatory and carrier requirements. We recommend that you use the new GetSmsTemplate - Query template review details API. The new API returns more detailed template information in its response.
-
Review timeline: After you submit a template, Alibaba Cloud typically completes the review within two hours. Review hours are 9:00 to 21:00 (UTC+8) from Monday to Sunday. Reviews are postponed during public holidays. We recommend that you submit your templates before 18:00 (UTC+8).
-
If a template fails review, the response includes the reason for the rejection. For more information, see Suggestions for handling a failed review. You can then call the ModifySmsTemplate API or modify the template on the Template Management page.
-
QuerySmsTemplate queries the review details of a single template by its template code. To query the details of all templates in your account, call the QuerySmsTemplateList API.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dysms:QuerySmsTemplate |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| TemplateCode |
string |
Yes |
The template code.
|
SMS_1525*** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The data returned. |
||
| TemplateContent |
string |
The template content. |
You are applying for mobile registration. The verification code is: ${code}, valid for 5 minutes! |
| RequestId |
string |
The request ID. |
0A974B78-02BF-4C79-ADF3-90CFBA1B55B1 |
| TemplateCode |
string |
The template code. |
SMS_16703**** |
| TemplateStatus |
integer |
The review status of the template. Valid values:
|
1 |
| Code |
string |
The status code of the request.
|
OK |
| TemplateType |
integer |
The message type. Valid values:
|
1 |
| Message |
string |
The description of the status code. |
OK |
| TemplateName |
string |
The template name. |
aliyun verification code |
| CreateDate |
string |
The time when the template was created. |
2019-06-04 11:42:17 |
| Reason |
string |
The review notes for the template.
|
The document cannot verify the authenticity of the information. Please upload it again. |
Examples
Success response
JSON format
{
"TemplateContent": "You are applying for mobile registration. The verification code is: ${code}, valid for 5 minutes!",
"RequestId": "0A974B78-02BF-4C79-ADF3-90CFBA1B55B1",
"TemplateCode": "SMS_16703****",
"TemplateStatus": 1,
"Code": "OK",
"TemplateType": 1,
"Message": "OK",
"TemplateName": "aliyun verification code",
"CreateDate": "2019-06-04 11:42:17",
"Reason": "The document cannot verify the authenticity of the information. Please upload it again."
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.