Queries the details of a message template.
Operation description
QPS limit
This operation allows a maximum of 5 requests per second (RPS) per account. Excess requests are throttled, which may affect your business. Stay within the specified limit.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cams:GetChatappTemplateDetail |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| TemplateCode |
string |
No |
The code of the message template. |
****4b5c79c9432497a075bdfca36bf5 |
| Language |
string |
Yes |
The language that is used in the message template. For more information, see Language codes. |
en_US |
CustWabaId
deprecated
|
string |
No |
The WhatsApp Business account (WABA) ID of the user within the independent software vendor (ISV) account. Note
CustWabaId is an obsolete parameter. Use CustSpaceId instead. |
65921621816**** |
| IsvCode |
string |
No |
The independent software vendor (ISV) verification code. This parameter is used to verify whether the user is authorized by the ISV account. |
skdi3kksloslikdkkdk |
| CustSpaceId |
string |
Yes |
The space ID of the user within the ISV account. |
28251486512358**** |
| TemplateType |
string |
No |
The type of the message template. Valid values:
|
|
| TemplateName |
string |
No |
Name of a template. |
test_name |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
744c4b5c79c9432497a075bdfca3**** |
| Code |
string |
The HTTP status code.
|
OK |
| Message |
string |
The error message. |
User not authorized to operate on the specified resource. |
| Data |
object |
The returned data. |
{ "category": "ACCOUNT_UPDATE", "name": "account_notice", "language": "en_US", "templateCode": "744c4b5c79c9432497a075bdfca3****", "auditStatus": "APPROVED", "components": "[{\"type\":\"BODY\",\"text\":\"body_text$(textVariable)\"},{\"type\":\"HEADER\",\"formate\":\"IMAGE\",\"url\":\"$(linkVariable)\"},{\"type\":\"FOOTER\",\"text\":\"footer-text\"},{\"type\":\"BUTTONS\",\"buttons\":[{\"type\":\"PHONE_NUMBER\",\"text\":\"phone-button-text\",\"phone_number\":\"+861388888****\"},{\"type\":\"URL\",\"text\":\"url-button-text\",\"url\":\"https://www.website.com/\"}]}]", "example": "{\"textVariable\": \"text\", \"linkVariable\": \"link\"}" } |
| Category |
string |
The category of the template when the returned value of TemplateType is WHATSAPP. Valid values:
The category of the template when the returned value of the TemplateType parameter is VIBER. Valid values:
Note
If Category is set to text_video_button, users cannot open a web page by clicking the button. Users can open only the video in the message. In this case, you do not need to specify the Url parameter for the URL button in the template. |
UTILITY |
| TemplateCode |
string |
The code of the message template. |
744c4b5c79c9432497a075bdfca3**** |
| Name |
string |
The name of the message template. |
hello_whatsapp |
| Language |
string |
The language that is used in the message template. For more information, see Language codes. |
en_US |
| Example |
object |
The examples of variables. |
|
|
string |
The values of the variables that are included in the message template. The values must be in the JSON format. |
{\"textVariable\":\"text\",\"linkVariable\":\"https://image.developer.aliy\"} |
|
| AuditStatus |
string |
The review status of the message template. Valid values:
|
pass |
| Components |
array<object> |
The components of the message template. |
|
|
array<object> |
The information about the array object. |
||
| Type |
string |
The component type. Valid values:
Note
|
BODY |
| Url |
string |
The URL of the media resource. |
https://image.developer.aliyundoc.com |
| Text |
string |
The text of the message that you want to send. |
Hello |
| Caption |
string |
The description of the document. |
New file uploaded |
| FileName |
string |
The name of the document. |
Express shipment |
| Format |
string |
The format. |
TEXT |
| Buttons |
array<object> |
The buttons. This parameter is returned only if the Type sub-parameter of the Components parameter is set to BUTTONS. Note
|
|
|
array<object> |
The information about the array object. |
||
| Type |
string |
The button type. Valid values:
Note
|
PHONE_NUMBER |
| Text |
string |
The display name of the button. |
Call |
| PhoneNumber |
string |
The phone number. This parameter is valid only if the Type sub-parameter of the Buttons parameter is set to PHONE_NUMBER. |
+861398745**** |
| Url |
string |
The URL to which you are redirected when you click the URL button. |
https://example.com |
| UrlType |
string |
The URL type. Valid values:
|
static |
| SignatureHash |
string |
The app signing key hash that WhatsApp uses to load your app. This parameter is required if Category is set to AUTHENTICATION and the Type sub-parameter of the Buttons parameter is set to ONE_TAP in a WhatsApp message template. |
2993839 |
| PackageName |
string |
The app package name that WhatsApp uses to load your app. This parameter is required if Category is set to AUTHENTICATION and the Type sub-parameter of the Buttons parameter is set to ONE_TAP in a WhatsApp message template. |
com.aliyun |
| AutofillText |
string |
The text of the one-tap autofill button. This parameter is required if Category is set to AUTHENTICATION and the Type sub-parameter of the Buttons parameter is set to ONE_TAP in a WhatsApp message template. |
Autofill |
| IsOptOut |
boolean |
The unsubscribe button. This parameter is valid if Category is set to MARKETING and the Type sub-parameter of the Buttons parameter is set to QUICK_REPLY for a WhatsApp message template. Marketing messages will not be sent to customers if you configure message sending in the Chat App Message Service console and the customers click this button. |
false |
| ExtendAttrs |
object |
The extended fields. |
|
| NextTemplateCode |
string |
The code of the next template. |
20939920093993 |
| NextTemplateName |
string |
The name of the next template. |
abc |
| NextLanguageCode |
string |
The language of the next template. |
en |
| Action |
string |
The event type. |
nextCard |
| IntentCode |
string |
The intent code. |
test |
| CouponCode |
string |
The coupon code. |
202039ksjs |
| FlowId |
string |
The Flow ID. |
3838292983 |
| FlowAction |
string |
The Flow action. Valid values: NAVIGATE and DATA_EXCHANGE. |
NAVIGATE |
| NavigateScreen |
string |
The first screen in the Flow. This parameter is returned if FlowAction is set to NAVIGATE. |
DETAILS |
| SupportedApps |
array<object> |
The apps that support one-tap authentication and zero-tap authentication. |
|
|
object |
|||
| SignatureHash |
string |
The app signing key hash. |
29kdkeik939 |
| PackageName |
string |
The app package name. |
com.test |
| ThumbUrl |
string |
The thumbnail URL of the video in the Viber message template. |
https://img.png |
| Duration |
integer |
The length of the video in the Viber message template. Unit: seconds. Valid values: 0 to 600. |
50 |
| FileType |
string |
The type of the document attached in the Viber message template. |
docx |
| Latitude |
string |
The latitude of the location. |
28.001 |
| Longitude |
string |
The longitude of the location. |
120.002 |
| LocationName |
string |
The name of the location. |
Hangzhou |
| LocationAddress |
string |
The address of the location. |
Hangzhou |
| AddSecretRecommendation |
boolean |
The note indicating that customers cannot share verification codes with others. The note is displayed in the message body. This parameter is valid if Category is set to AUTHENTICATION and the Type sub-parameter of the Components parameter is set to BODY for a WhatsApp message template. |
false |
| CodeExpirationMinutes |
integer |
The validity period of the verification code in the WhatsApp authentication template. Unit: minutes. This parameter is valid only when Category is set to AUTHENTICATION and the Type sub-parameter of the Components parameter is set to FOOTER for a WhatsApp message template. The validity period of the verification code is displayed in the footer. |
5 |
| hasExpiration |
boolean |
Indicates whether the coupon code has an expiration time in the limited-time offer template. |
true |
| OfferExpirationTimeMs |
string |
The variable when the coupon code expires in the limited-time offer template. |
$(offerExpirationTimeMs) |
| Cards |
array<object> |
The carousel cards. |
|
|
array<object> |
|||
| CardComponents |
array<object> |
The components of the carousel card. |
|
|
array<object> |
|||
| Type |
string |
The component type. |
HEADER |
| Text |
string |
The text of the carousel card. |
Body |
| Url |
string |
The URL. |
https://aliyun.com |
| Format |
string |
The type of the header in the carousel template. The header can only be an image or a video. The headers of all carousel cards must be the same. The type of the media resources that are included in the message. Valid values: IMGAGE and VIDEO. |
HEADER |
| Buttons |
array<object> |
The buttons of the carousel card. |
|
|
object |
|||
| Type |
string |
The type of the button in the carousel template. Valid values: URL, PHONE_NUMBER, and QUICK_REQLY. |
URL |
| Text |
string |
The button text. |
Button text |
| Url |
string |
The URL to which you are redirected when you click the URL button. |
https://aliyun.com |
| UrlType |
string |
The type of the URL. Valid values: static and dynamic. |
static |
| PhoneNumber |
string |
The phone number. |
+861380005**** |
| TemplateType |
string |
The type of the message template. Valid values:
|
|
| QualityScore |
string |
The quality of the template. Valid values:
|
GREEN |
| MessageSendTtlSeconds |
integer |
The validity period of the WhatsApp authentication message. |
120 |
| Reason |
string |
The reason why the template was rejected. |
None |
| AccessDeniedDetail |
string |
Access denied details. |
None |
Examples
Success response
JSON format
{
"RequestId": "744c4b5c79c9432497a075bdfca3****",
"Code": "OK",
"Message": "User not authorized to operate on the specified resource.",
"Data": {
"Category": "UTILITY",
"TemplateCode": "744c4b5c79c9432497a075bdfca3****",
"Name": "hello_whatsapp",
"Language": "en_US",
"Example": {
"key": "{\\\"textVariable\\\":\\\"text\\\",\\\"linkVariable\\\":\\\"https://image.developer.aliy\\\"}"
},
"AuditStatus": "pass",
"Components": [
{
"Type": "BODY",
"Url": "https://image.developer.aliyundoc.com",
"Text": "Hello",
"Caption": "New file uploaded",
"FileName": "Express shipment",
"Format": "TEXT",
"Buttons": [
{
"Type": "PHONE_NUMBER",
"Text": "Call",
"PhoneNumber": "+861398745****",
"Url": "https://example.com\n",
"UrlType": "static",
"SignatureHash": "2993839",
"PackageName": "com.aliyun",
"AutofillText": "Autofill",
"IsOptOut": false,
"ExtendAttrs": {
"NextTemplateCode": "20939920093993",
"NextTemplateName": "abc",
"NextLanguageCode": "en",
"Action": "nextCard",
"IntentCode": "test"
},
"CouponCode": "202039ksjs",
"FlowId": "3838292983",
"FlowAction": "NAVIGATE",
"NavigateScreen": "DETAILS",
"SupportedApps": [
{
"SignatureHash": "29kdkeik939",
"PackageName": "com.test"
}
]
}
],
"ThumbUrl": "https://img.png",
"Duration": 50,
"FileType": "docx",
"Latitude": "28.001",
"Longitude": "120.002",
"LocationName": "Hangzhou",
"LocationAddress": "Hangzhou",
"AddSecretRecommendation": false,
"CodeExpirationMinutes": 5,
"hasExpiration": true,
"OfferExpirationTimeMs": "$(offerExpirationTimeMs)",
"Cards": [
{
"CardComponents": [
{
"Type": "HEADER",
"Text": "Body",
"Url": "https://aliyun.com",
"Format": "HEADER",
"Buttons": [
{
"Type": "URL",
"Text": "Button text",
"Url": "https://aliyun.com",
"UrlType": "static",
"PhoneNumber": "+861380005****"
}
]
}
]
}
]
}
],
"TemplateType": "WHATSAPP",
"QualityScore": "GREEN",
"MessageSendTtlSeconds": 120,
"Reason": "None"
},
"AccessDeniedDetail": "None"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Product.Unsubscript | You have not subscribed to the specified product. | You have not subscribed to the specified product. |
| 400 | Ram.PermissionDeny | You are not authorized to perform the operation. | |
| 400 | System.LimitControl | The system is under flow control. | The system is under flow control. |
| 400 | Unknown.ResourceOwnerId | The resource does not belong to the current user. | The resource does not belong to the current user. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.