The code of the message template.
Operation description
The name of the message template.
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:ModifyChatappTemplate | update | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Components | array<object> | Yes | The components of the message template. Note
If Category is set to AUTHENTICATION, the Type sub-parameter of the Components parameter cannot be set to HEADER. If the Type sub-parameter is set to BODY or FOOTER, you do not need to set the Text sub-parameter of the Components parameter because the value is automatically generated.
| |
object | Yes | The components of the message template. Note
If Category is set to AUTHENTICATION, the Type sub-parameter of the Components parameter cannot be set to HEADER. If the value of Type is BODY or FOOTER, the Text sub-parameter of the Components parameter is empty.
| ||
Type | string | Yes | The component type. Valid values:
Note
| BODY |
Text | string | No | The text of the message that you want to send. Note
If Category is set to AUTHENTICATION, do not specify the Text sub-parameter of the Components parameter.
| hello chatapp |
Format | string | No | The type of the media resource. Valid values:
| TEXT |
Url | string | No | The URL of the media resource. | https://img.tukuppt.com/png_preview/00/10/24/1GygxVK3F4.jpg |
Caption | string | No | The description of the media resource. Note
If the Type sub-parameter of the Components parameter is set to HEADER and the Format parameter is set to IMAGE, DOCUMENT, or VIDEO, you can specify this parameter.
| This is a video |
FileName | string | No | The name of the document. Note
If the Type sub-parameter of the Components parameter is set to HEADER and the Format parameter is set to DOCUMENT, you can specify this parameter.
| video name |
Buttons | array<object> | No | The buttons. Specify this parameter only if you set the Type sub-parameter of the Components parameter to BUTTONS.
| |
object | No | The button. | ||
Type | string | Yes | The button type. Valid values:
Note
| PHONE_NUMBER |
Text | string | No | The text of the button. | phone-button-text |
PhoneNumber | string | No | The phone number. | +8613888887889 |
Url | string | No | The URL to which you are redirected when you click the URL button. | https://www.website.com/ |
UrlType | string | No | The URL type. Valid values:
| dynamic |
SignatureHashdeprecated | string | No | 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 for a WhatsApp message template. | 29dkeke |
PackageNamedeprecated | string | No | 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 for a WhatsApp message template. | com.demo |
AutofillText | string | No | 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 for a WhatsApp message template. | Autofill |
IsOptOut | boolean | No | 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 |
CouponCode | string | No | The coupon code. It can contain only letters and digits. You can set this parameter to a variable such as $(couponCode). Specify the value of couponCode when you send a message. | 120293 |
FlowId | string | No | The Flow ID. | 664597077870605 |
FlowAction | string | No | The Flow action. Valid values:
| NAVIGATE |
NavigateScreen | string | No | The first screen in the Flow. This parameter is required if FlowAction is set to NAVIGATE. | |
SupportedApps | array<object> | No | List of supported apps. | |
object | No | List of supported apps. | ||
SignatureHash | string | No | The Whatsapp template is required when the Category is' Authorisation 'and the Button Type is' ONE_TAP/ZERO-TAP', indicating the signature hash value of the Whatsapp call application. | fk39kd93ks9 |
PackageName | string | No | The Whatsapp template is required when the Category is' Authorisation 'and the Button Type is' ONE_TAP/ZERO-TAP', indicating the signature hash value of the Whatsapp call application. | com.example.myapplication |
ThumbUrl | string | No | The thumbnail URL of the video in the Viber message template. | https://cdn.multiplymall.mobiapp.cloud/cloudcode/yc-165407506207478-165511576113195/20220905/ec5b9737-1507-4208-bb27-8da3958da961.jpg?x-oss-process=image/resize,w_100 |
Duration | integer | No | The length of the video in the Viber message template. Unit: seconds. Valid values: 0 to 600. | 120 |
FileType | string | No | The type of the document attached in the Viber message template. | docx |
CodeExpirationMinutes | integer | No | 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. The validity period of the verification code is displayed in the footer. | 5 |
AddSecretRecommendation | boolean | No | 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 |
HasExpiration | boolean | No | Specifies whether the coupon code has an expiration time. Specify this parameter if the Type sub-parameter of the Components parameter is set to LIMITED_TIME_OFFER. | true |
Cards | array<object> | No | The carousel cards of the carousel template. | |
object | No | |||
CardComponents | array<object> | Yes | The components of the carousel card. | |
object | No | |||
Type | string | Yes | The component type. Valid values:
| BODY |
Format | string | No | The type of the media resource. This parameter is valid if the Type sub-parameter of the CardComponents parameter is set to HEADER. Valid values:
| IMAGE |
Text | string | No | The body content of the carousel card. | Who is the very powerful team |
Url | string | No | The URL of the media resource. | https://alibaba.com/img.png |
Buttons | array<object> | No | The buttons. Specify this parameter only if you set the Type sub-parameter of the CardComponents parameter to BUTTONS. A carousel card can contain up to two buttons. | |
object | No | |||
Text | string | No | The text of the button. | Call me |
Type | string | Yes | The button type. Valid values:
| PHONE_NUMBER |
Url | string | No | The URL to which you are redirected when you click the URL button. | https://alibaba.com/xx |
UrlType | string | No | The URL type. Valid values:
| static |
PhoneNumber | string | No | The phone number. | +8613800 |
Language | string | Yes | The language that is used in the message template. For more information, see Language codes. | en |
Example | object | No | The examples of variables that are used when you create the message template. | |
string | No | The examples of variables that are used when you create the message template. | {"textVariable":"text"} | |
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.
| 659216218162179 |
IsvCode | string | No | The ISV verification code, which is used to verify whether the user is authorized by the ISV account. | ksiekdki39ksks93939 |
TemplateCode | string | No | The message template code. | 8472929283883 |
CustSpaceId | string | No | The space ID of the user within the ISV account. | 28251486512358**** |
Category | string | No | The category of the Viber message template. Valid values:
Note
This parameter applies only to Viber message templates.
| text |
TemplateType | string | No | The type of the message template.
| |
MessageSendTtlSeconds | integer | No | Validity period of authentication template message sending in WhatsApp Note
This attribute requires providing waba in advance to Alibaba operators to open the whitelist, otherwise it will result in template submission failure
| 120 |
TemplateName | string | No | Template name. | test_name |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "90E63D28-E31D-1EB2-8939-A9486641****",
"Code": "OK",
"Message": "NONE",
"Data": {
"TemplateCode": "8472929283883",
"TemplateName": "hello_whatsapp"
},
"AccessDeniedDetail": "None\n"
}
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 | View Change Details |
2024-04-10 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-11-22 | The Error code has changed | View Change Details |
2023-11-21 | The Error code has changed | View Change Details |
2023-10-19 | The Error code has changed | View Change Details |
2023-08-17 | The Error code has changed. The request parameters 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-08 | The Error code has changed | View Change Details |
2023-03-02 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2022-09-29 | Add Operation | View Change Details |