Call SendChatappMassMessage to send a Viber message to multiple phone numbers in a single request.
API description
Call SendChatappMassMessage to send a Viber message to multiple phone numbers at a time.
The per-account rate limit is 10 queries per second (QPS). If this limit is exceeded, throttling is triggered and may affect your business.
Each request supports up to 1,000 phone numbers.
Debugging
You can call this operation in OpenAPI Explorer, which automatically calculates the signature value and generates sample code for different SDKs.
Authorization information
The following table describes the authorization information for this API operation. You can use the information in the Action policy element to grant a RAM user or RAM role the permissions to call this operation.
-
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 RAM role to perform the operation.
-
Required resource types are displayed in bold.
-
If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
-
-
Condition Key: the condition key defined by the cloud service.
-
Associated operation: other operations that the RAM user or RAM role must have permissions to perform to complete this operation.
|
Operation |
Access level |
Resource type |
Condition key |
Associated operation |
|
cams:SendChatappMassMessage |
Write |
| None | None |
Request parameters
Parameter | Type | Required | Description | Example | ||||
ChannelType | string | Yes | The channel type. Set this parameter to viber. | viber | ||||
TemplateCode | string | Yes | The template code. | 744c4b5c79c9432497a075bdfca36bf5 | ||||
Language | string | Yes | The language code. For more information, see Language codes. | en | ||||
From | string | Yes | The phone number of the message sender. | 2***0 | ||||
FallBackId | string | No | The fallback policy ID. | S00001 | ||||
FallBackContent | string | No | The content of the fallback message. | Fallback text message | ||||
TaskId | string | No | The task ID. | 100000001 | ||||
SenderList | object [] | Yes | The list of message recipients. | |||||
To | string | Yes | The phone number of the message recipient. | 2***1 | ||||
TemplateParams | object | No | The template parameters. | |||||
string | No | The template parameters. | {"param1":"value1","param2":"value2"} | |||||
CustSpaceId | string | No | The space ID of the RAM user. | 28251486512358**** | ||||
Ttl | long | No | The message sending timeout period. Unit: seconds. Valid values: 30 to 1209600. | 50 | ||||
Label | string | No | The Viber message type. Valid values:
| promotion | ||||
Tag | string | No | The tag information of the Viber message. | tag A | ||||
FallBackDuration | integer | No | The waiting period before a fallback message is sent. If this parameter is left empty, the fallback message is sent only when the message fails to be sent or a delivery failure receipt is received. Unit: seconds. Valid values: 60 to 43200. | 120 | ||||
FallBackRule | string | No | The fallback rule. Valid values:
| undelivered | ||||
Response parameters
Parameter | Type | Description | Example |
object | |||
RequestId | string | The request ID. | 90E63D28-E31D-1EB2-8939-A9486641**** |
Code | string | The status code.
| OK |
Message | string | The error message. | User not authorized to operate on the specified resource. |
GroupMessageId | string | The message group ID. | 890000010002**** |
AccessDeniedDetail | string | The access denial details. | None |
Examples
Sample success responses
JSON format
{
"RequestId": "90E63D28-E31D-1EB2-8939-A9486641****",
"Code": "OK",
"Message": "User not authorized to operate on the specified resource.",
"GroupMessageId": "890000010002****",
"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.