Sends ChatApp messages in batches.
Operation description
-
You can call this API operation to send messages in batches. You can also manually send messages in batches on the Channel Management > Manage > Send Message page.
-
Before you call this API operation, make sure that you have created a channel and have an approved template.
-
For the WhatsApp channel type, you must complete WABA registration and binding and add a phone number.
-
For the Messenger channel type, you must connect a Facebook page account.
-
For the Instagram channel type, you must connect a professional account.
-
For the Viber channel type, you must request a service ID.
QPS limits
-
The queries per second (QPS) limit for a single user for this API operation is 10 calls per second. If the limit is exceeded, API calls are throttled. This may affect your business. Plan your calls accordingly.
-
A single request can include up to 1,000 phone numbers.
Status changes
You can monitor the message sending status using MNS or HTTP. For more information, see Receipts.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cams:SendChatappMassMessage |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ChannelType |
string |
Yes |
The channel type. Valid values:
|
|
| TemplateCode |
string |
No |
The template code. View the template code on the Channel Management > Manage > Template Design page. |
1119*************** |
| Language |
string |
Yes |
The language. For a list of language codes, see Language codes. |
en |
| From |
string |
Yes |
The sender's number.
|
861387777**** |
CustWabaId
deprecated
|
string |
No |
The WhatsApp Business Account (WABA) ID of the Independent Software Vendor (ISV) customer. This parameter is deprecated. Use CustSpaceId, which is the instance ID for direct customers. View the ID on the Channel Management page. |
cams-8c8********* |
| FallBackId |
string |
No |
The fallback policy ID. This parameter is for the international site (alibabacloud.com). You can ignore this parameter if you are on the China site (aliyun.com). View the policy ID on the Fallback Strategy page. |
S0**** |
| FallBackContent |
string |
No |
The custom fallback content. This parameter is for the international site (alibabacloud.com). You can ignore this parameter if you are on the China site (aliyun.com). |
Fallback SMS |
| TaskId |
string |
No |
The custom task ID. |
10000**** |
| SenderList |
array<object> |
No |
A list of recipients to send messages to. |
|
|
array<object> |
No |
The phone number of the recipient. |
||
| TemplateParams |
object |
No |
The collection of template parameters. |
|
|
string |
No |
The template parameter. It is in a key-value format. The key is the parameter name, and the value is the parameter value. |
{ "param1": "value1", "param2": "value2" } |
|
| FlowAction |
object |
No |
The Flow message object. |
|
| FlowActionData |
object |
No |
The collection of default flow parameters. |
|
|
any |
No |
The default flow parameter. It is in a key-value format. The key is the parameter name, and the value is the parameter value. |
{ "name": "name" } |
|
| FlowToken |
string |
No |
The custom flow token information. |
kde**** |
| Payload |
array |
No |
The list of payloads for the buttons. |
|
|
string |
No |
The payload for a button. |
payloadtext |
|
| To |
string |
No |
The recipient's number.
|
861386666**** |
| ProductAction |
object |
No |
The product information. This parameter is only for the whatsapp channel type. It is the product information you uploaded to Meta. |
|
| ThumbnailProductRetailerId |
string |
No |
The product catalog ID. Get it by calling the ListProductCatalog API operation. |
skkks99**** |
| Sections |
array |
No |
The list of product categories. You can have up to 10 categories and 30 products. |
|
|
array<object> |
No |
The product category. |
||
| Title |
string |
No |
The category name. View it on the Channel Management > Manage > Catalog Management > Product Management page or get it by calling the ListProduct API operation. |
abcd |
| ProductItems |
array |
No |
The list of product information. |
|
|
object |
No |
The product information. |
||
| ProductRetailerId |
string |
No |
The product ID. View it on the Channel Management > Manage > Catalog Management > Product Management page or get it by calling the ListProduct API operation. |
ksi3**** |
IsvCode
deprecated
|
string |
No |
The ISV checksum. It is used to verify if a RAM user is authorized by the ISV. This parameter is deprecated. You can ignore it. |
skdi3kksloslikd**** |
| CustSpaceId |
string |
No |
The SpaceId of the ISV's sub-customer, which is the instance ID for direct customers. View it on the Channel Management page. |
cams-8c8********* |
| Ttl |
integer |
No |
The timeout period for sending a Viber message. This parameter is for the international site (alibabacloud.com). You can ignore this parameter if you are on the China site (aliyun.com). Unit: seconds. Valid values: 30 to 1209600. |
46 |
| Label |
string |
No |
The Viber message type. This parameter is for the international site (alibabacloud.com). You can ignore this parameter if you are on the China site (aliyun.com). Valid values:
|
promotion |
| Tag |
string |
No |
The tag information. This is a custom tag for sending Viber messages. |
Tag |
| FallBackDuration |
integer |
No |
The fallback trigger time. This parameter is for the international site (alibabacloud.com). You can ignore this parameter if you are on the China site (aliyun.com). If a delivery receipt is not returned within the specified time, a fallback is triggered. If you leave this parameter empty, the fallback is not determined by time. A fallback is triggered only when the message fails to be sent or a failed status report is received. Unit: seconds. Minimum value: 60. Maximum value: 43200. |
120 |
| FallBackRule |
string |
No |
The fallback rule. This parameter is for the international site (alibabacloud.com). You can ignore this parameter if you are on the China site (aliyun.com). Valid values:
|
undelivered |
| TemplateName |
string |
No |
The template name. View the template name on the Channel Management > Manage > Template Design page. |
test_name |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The returned data. |
||
| AccessDeniedDetail |
string |
The details of the access denial. |
None |
| RequestId |
string |
The request ID. |
90E63D28-E31D-1EB2-8939-A9486641**** |
| Message |
string |
The error message. |
User not authorized to operate on the specified resource. |
| GroupMessageId |
string |
The batch message ID. |
890000010002**** |
| Code |
string |
The request status code.
|
OK |
Examples
Success response
JSON format
{
"AccessDeniedDetail": "None",
"RequestId": "90E63D28-E31D-1EB2-8939-A9486641****",
"Message": "User not authorized to operate on the specified resource.",
"GroupMessageId": "890000010002****",
"Code": "OK"
}
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.