Retrieves the details of a Chat App Message Service message template.
Operation description
QPS limit
The single-user QPS limit for this API is 5 calls per second. If this limit is exceeded, the API calls are throttled, which may affect your business. Call this operation appropriately.
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 template. |
****4b5c79c9432497a075bdfca36bf5 |
| Language |
string |
Yes |
The language of the template. For detailed language codes, see Language codes. |
en_US |
CustWabaId
deprecated
|
string |
No |
The WabaId of the ISV customer. Note
Deprecated parameter. Use CustSpaceId instead. |
65921621816**** |
IsvCode
deprecated
|
string |
No |
The ISV verification code, which is used to verify whether the sub-account is authorized by the ISV. |
skdi3kksloslikdkkdk |
| CustSpaceId |
string |
No |
The SpaceId of the ISV sub-customer or the instance ID of the direct customer. |
28251486512358**** |
| TemplateType |
string |
No |
The templatetype. Valid values:
|
|
| TemplateName |
string |
No |
The name of the template. |
test_name |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response data. |
||
| RequestId |
string |
The request ID. |
744c4b5c79c9432497a075bdfca3**** |
| Code |
string |
The request 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 WhatsApp template category. Valid values:
Viber template category. Valid values:
|
UTILITY |
| TemplateCode |
string |
The code of the template. |
744c4b5c79c9432497a075bdfca3**** |
| Name |
string |
The name of the template. |
hello_whatsapp |
| Language |
string |
The language of the template. For detailed language codes, see Language codes. |
en_US |
| Example |
object |
The variable example. |
|
|
string |
The actual value corresponding to the template variable. The parameter is in JSON format. |
{\"textVariable\":\"text\",\"linkVariable\":\"https://image.developer.aliy\"} |
|
| AuditStatus |
string |
The audit status. Valid values:
|
pass |
| Components |
array<object> |
The list of message template components. |
|
|
array<object> |
The message template component. |
||
| Type |
string |
The component type.
Note
|
BODY |
| Url |
string |
The material URL. |
https://image.developer.aliyundoc.com |
| Text |
string |
The text of the message to be sent. |
hello |
| Caption |
string |
The file description. |
example |
| FileName |
string |
The file name. |
example |
| Format |
string |
The format. |
TEXT |
| Buttons |
array<object> |
The button list. Applicable only to the BUTTONS component. Note
WhatsApp button quantity rules:
|
|
|
array<object> |
The component list. |
||
| Type |
string |
The button type.
Note
|
PHONE_NUMBER |
| Text |
string |
The display name of the button. |
example |
| PhoneNumber |
string |
The phone number. Valid only when the button type is PHONE_NUMBER. |
+861398745**** |
| Url |
string |
The URL that is accessed when the link button is clicked. |
https://example.com |
| UrlType |
string |
The URL type.
|
static |
| SignatureHash |
string |
Required for WhatsApp templates with Category set to Authentication and Button Type set to ONE_TAP. Specifies the signature hash value for WhatsApp to launch the application. |
2993839 |
| PackageName |
string |
Required for WhatsApp templates with Category set to Authentication and Button Type set to ONE_TAP. Specifies the package name for WhatsApp to launch the application. |
com.aliyun |
| AutofillText |
string |
Required for WhatsApp templates with Category set to Authentication and Button Type set to ONE_TAP. Specifies the button text for the WhatsApp Autofill operation. |
Autofill |
| IsOptOut |
boolean |
Valid for WhatsApp templates with Category set to Marketing and Button Type set to QUICK_REPLY. Indicates that the button is a marketing opt-out button. If a customer clicks this button and the send control operation is configured on the Chat App Message Service platform, subsequent Marketing messages will not be sent to the customer. |
false |
| ExtendAttrs |
object |
The extended fields. |
|
| NextTemplateCode |
string |
The next template code. |
20939920093993 |
| NextTemplateName |
string |
The next template name. |
abc |
| NextLanguageCode |
string |
The next template language. |
en |
| Action |
string |
The event type. |
nextCard |
| IntentCode |
string |
The intent code. |
test |
| CouponCode |
string |
The coupon code. |
202039ksjs |
| FlowId |
string |
Flow ID |
3838292983 |
| FlowAction |
string |
The Flow data event type. Valid values:
|
NAVIGATE |
| NavigateScreen |
string |
The navigate screen. Required when FlowAction is set to NAVIGATE. |
DETAILS |
| SupportedApps |
array<object> |
The applications supported by the ONE_TAP/ZERO_TAP verification code. |
|
|
object |
The applications supported by the ONE_TAP/ZERO_TAP verification code. |
||
| SignatureHash |
string |
The package signature hash. |
29kdkeik939 |
| PackageName |
string |
The package name. |
com.test |
| ThumbUrl |
string |
The thumbnail for a Viber video message. |
https://img.png |
| Duration |
integer |
The video duration of a Viber video message. Valid values: 0 to 600. |
50 |
| FileType |
string |
The file type of a Viber file message. |
docx |
| Latitude |
string |
The latitude of the location. |
28.001 |
| Longitude |
string |
The longitude of the location. |
120.002 |
| LocationName |
string |
The location name. |
hangzhou |
| LocationAddress |
string |
The location address. |
hangzhou |
| AddSecretRecommendation |
boolean |
Valid for WhatsApp templates when Category is Authentication and Component Type is Body. Indicates whether a security recommendation message that advises users not to share the verification code is displayed above the Body. |
false |
| CodeExpirationMinutes |
integer |
The verification code validity period in minutes for WhatsApp Authentication templates. Valid only when the message type is WhatsApp, Category is Authentication, and Component Type is Footer. This information is displayed in the Footer position. |
5 |
| hasExpiration |
boolean |
Specifies whether the offer code has an expiration time in a Limited Time Offer (LTO) template. |
true |
| OfferExpirationTimeMs |
string |
The offer code expiration variable in a Limited Time Offer (LTO) template. |
$(offerExpirationTimeMs) |
| Cards |
array<object> |
The list of carousel cards. |
|
|
array<object> |
The carousel template card list. |
||
| CardComponents |
array<object> |
The list of card components. |
|
|
array<object> |
The list of components in a carousel card. |
||
| Type |
string |
The component type. |
HEADER |
| Text |
string |
The card text content. |
Body |
| Url |
string |
The web URL. |
https://aliyun.com |
| Format |
string |
The header type in a carousel template. Only IMAGE and VIDEO are supported. All cards must have the same header type. |
HEADER |
| Buttons |
array<object> |
The list of card buttons. |
|
|
object |
The button object. |
||
| Type |
string |
The button type for a carousel template. Valid values: URL, PHONE_NUMBER, or QUICK_REPLY. |
URL |
| Text |
string |
The button content. |
example |
| Url |
string |
The URL to visit when the button is clicked. |
https://aliyun.com |
| UrlType |
string |
The URL type. Valid values:
|
static |
| PhoneNumber |
string |
The phone number. |
+861380005**** |
| TemplateType |
string |
The templatetype.
|
|
| QualityScore |
string |
The template quality.
|
GREEN |
| MessageSendTtlSeconds |
integer |
The message time-to-live when sending WhatsApp Authentication template messages. |
120 |
| Reason |
string |
The reason for template review rejection. |
None |
| CategoryChangePaused |
boolean |
Indicates whether template sending is paused when a Utility template is changed to a Marketing template. |
true |
| AllowSend |
boolean |
Indicates whether the current template can be used for sending. This parameter is valid only for Marketing templates. |
true |
| ProductSetId |
string |
productSetId |
939*** |
| AccessDeniedDetail |
string |
The access denied detail information. |
None |
| Success |
boolean |
true |
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": "example",
"FileName": "example",
"Format": "TEXT",
"Buttons": [
{
"Type": "PHONE_NUMBER",
"Text": "example",
"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": "example",
"Url": "https://aliyun.com",
"UrlType": "static",
"PhoneNumber": "+861380005****"
}
]
}
]
}
]
}
],
"TemplateType": "WHATSAPP",
"QualityScore": "GREEN",
"MessageSendTtlSeconds": 120,
"Reason": "None",
"CategoryChangePaused": true,
"AllowSend": true,
"ProductSetId": "939***"
},
"AccessDeniedDetail": "None",
"Success": true
}
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.