Queries the information of a message template.
Operation description
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
cams:GetChatappTemplateDetail | get | *All Resources * |
| 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 |
CustWabaIddeprecated | 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 | No | 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 parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "744c4b5c79c9432497a075bdfca3****",
"Code": "OK",
"Message": "User not authorized to operate on the specified resource.",
"Data": {
"Category": "TRANSACTIONAL",
"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\n",
"Caption": "The new file has been uploaded.\n",
"FileName": "Express file\n",
"Format": "TEXT",
"Buttons": [
{
"Type": "PHONE_NUMBER",
"Text": "Call\n",
"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\n",
"LocationAddress": "Hangzhou\n",
"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\n",
"Url": "https://aliyun.com",
"UrlType": "static",
"PhoneNumber": "+86138000"
}
]
}
]
}
]
}
],
"TemplateType": "WHATSAPP",
"QualityScore": "GREEN",
"MessageSendTtlSeconds": 120,
"Reason": "None"
},
"AccessDeniedDetail": "None"
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
400 | Product.Unsubscript | 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. |
400 | Unknown.ResourceOwnerId | The resource does not belong to the current user. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-06-21 | The Error code has changed. The response structure of the API has changed | View Change Details |
2024-04-10 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-11-21 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-10-19 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-09-14 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-08-17 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-07-04 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-05-25 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-05-08 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-04-13 | The Error code has changed. The response structure of the API has changed | View Change Details |