SingleCallByTts

Updated at:

Sends a voice verification code or a voice notification with variables to a specified phone number.

Operation description

  • Due to business adjustments, the updates of the voice notification and voice verification code services have been stopped in regions outside the Chinese mainland and the services have been discontinued since March 2022. Only qualified customers can continue using the voice notification and voice verification code services.

  • For more information about voice plans or voice service billing, see Pricing of VMS on China site (aliyun.com).

QPS limits

You can call this operation up to 1,000 times per second per account.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dyvms:SingleCallByTts

none

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

CalledShowNumber

string

No

The number displayed to the called party.

  • You do not need to specify this parameter if you use the text-to-speech (TTS) notification template or voice verification code template for outbound calls in the common mode. For more information, see FAQ about the common outbound call mode.

  • If you use the TTS notification template or voice verification code template for outbound calls in the dedicated mode, you must specify a number you purchased and only one number can be specified. You can log on to the Voice Messaging Service console and choose Voice Numbers > Real Number Management to view the number you purchased.

0571****5678

CalledNumber

string

Yes

The mobile phone number that receives voice notifications.

  • Number format in the Chinese mainland:

    • Mobile phone number, for example, 159****0000.

    • Landline number, for example, 0571****5678.

  • Number format outside the Chinese mainland: country code + phone number, for example, 85200****00.

Note

1590****000

TtsCode

string

Yes

The ID of the approved TTS notification template or voice verification code template.

You can log on to the Voice Messaging Service console, and choose Voice Messages > Voice Verification Codes or choose Voice Messages > Voice Notifications to view the template ID.

Note

The account to which the TTS template belongs must be the same as the account that is used to call the SingleCallByTts operation.

TTS_28726****

TtsParam

string

No

The variables in the template, in the JSON format.

Note

The variables in the template must be less than 250 characters in length. The length of each single variable is not limited. These variables do not support URLs. The variables in the verification code template support only digits and letters.

{"AckNum":"123456"}

PlayTimes

integer

No

The number of times a voice notification is played back in a call. Valid values: 1 to 3. Default value: 3.

3

Volume

integer

No

The playback volume of the voice notification. Valid values: 0 to 100. Default value: 100.

100

Speed

integer

No

The playback speed. Valid value: -500 to 500.

5

OutId

string

No

The custom ID that is reserved for the caller of the operation when the request is initiated. This ID is returned to the caller in a receipt message.

The value is of the STRING type and must be 1 to 15 bytes in length.

225869*****

Response elements

Element

Type

Description

Example

object

The response parameters.

Code

string

The response code.

  • The value OK indicates that the request was successful.

  • For more information about other response codes, see API error codes.

OK

Message

string

The returned message.

OK

RequestId

string

The request ID.

D9CB3933-9FE3-4870-BA8E-2BEE91B69D23

CallId

string

The unique receipt ID of the call.

You can call the QueryCallDetailByCallId operation to query the details of the call based on the receipt ID.

116012354148^10281378****

Examples

Success response

JSON format

{
  "Code": "OK",
  "Message": "OK",
  "RequestId": "D9CB3933-9FE3-4870-BA8E-2BEE91B69D23",
  "CallId": "116012354148^10281378****"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.