Sends a voice verification code or voice notification with variables to a phone number. A voice file or text-to-speech (TTS) template is supported.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
CallerIdNumber | string | No | The calling number. If you do not specify this parameter, the system uses a local random number as the display number. If you use a dedicated number for outbound calls, you must specify the purchased number. You can specify only one number. You can log on to the VMS console and go to the number management page to view the purchased phone numbers. | 852****0001 |
CalledNumber | string | No | The phone number that receives the voice notification. You must add the country/region dialing code to the beginning of the phone number. Example: 85200****00. | 852****0000 |
TtsCode | string | No | The ID of the TTS template. You can log on to the VMS console and go to the TTS templates page to view the template ID. You must specify either TtsCode or VoiceCode. You can specify TtsCode to use the voice file as the call content, or you can specify VoiceCode to use preset text as the call content. | 1001 |
TtsParam | string | No | The variables in the template, in the JSON format. | {"code":"1234"} |
VoiceCode | string | No | The ID of the voice file template. You can log on to the VMS console and go to the voice file templates page to view the template ID. You must specify either TtsCode or VoiceCode. You can specify TtsCode to use the voice file as the call content, or you can specify VoiceCode to use preset text as the call content. | 1002 |
PlayTimes | long | No | The number of times the voice notification is played in the call. Valid values: 1 to 3. Default value: 3. | 2 |
Volume | long | No | The playback volume of the voice notification. Valid values: 0 to 100. Default value: 100. | 100 |
Speed | long | No | The playback speed. Valid values: -500 to 500. | 0 |
TaskName | string | No | The task name. | Task0 |
SendType | long | No | The delivery type. Valid values: 1 and 2. 1: immediately delivers the task. 2: delivers the task at a scheduled time. If you set this parameter to 2, you must specify TimingStart. | 1 |
TimingStart | string | No | The time when the task is scheduled to be delivered. | 2022-05-01T08:00:00+08:00 |
OutId | string | No | The ID reserved for the caller. This ID is returned to the caller in a receipt message. The value must be a string that is 1 to 15 bytes in length. | 22522**** |
CountryId | string | No | The ISO2 country/region code. | HK |
Response parameters
Examples
Sample success responses
JSON
format
{
"AccessDeniedDetail": "\"\"",
"Message": "OK",
"RequestId": "D9CB****-****-****-****-********9D23\n",
"Model": {
"test": "test",
"test2": 1
},
"Code": "OK",
"Success": true
}
Error codes
For a list of error codes, visit the Service error codes.