RapidAPI logo



Telesign Voice Verify

開発者 telesignOfficial
更新日 3ヶ月前

Telesign Voice Verify API Documentation

An API that delivers patented phone-based verification and two-factor authentication (2FA) using a one-time passcode (OTP) sent over voice message in the event the end-user chooses the voice method, provides a landline or is not authorized to receive SMS messages in a specific country.

POSTVoice Verify
POSTVoice Verify
REQUIREDThe end user’s phone number, as a string of digits without spaces or punctuation, beginning with the country dialing code (for example, “1” for North America).
REQUIREDThe verification code used for the code challenge. This is a randomly-generated numeric value. By default, TeleSign automatically generates a five-digit value for you. If you prefer to use your own verification code, you can override the default behavior by including this parameter and giving it a numeric value between 100 and 99999.
OPTIONALA string specifying a use case code. Choices include - ATCK - for use in a 2FA situation like updating an account or logging in BACF - for creating an account where the service may be vulnerable to bulk attacks and fraudsters BACS - for creating an account where the service may be vulnerable to bulk attacks or individual spammers CHBK - for use when someone is trying to buy something expensive or unusual and you want to verify it is really them CLDR - calendar event LEAD - for use in a situation where you require a person to enter personal information in order to obtain information about something like a loan or realty or school, and you want to check if the person is bogus or not OTHR - if you have a situation not addressed by other tags PWRT - for use in a situation where a password reset is required RESV - for use when you have end users making reservations and not showing up, and you want to be able to include phone verification in the loop RXPF - for use when you are trying to prevent prescription fraud SHIP - for use when you are sending a shipping notification THEF - for use when you are trying to prevent an end user from deactivating or redirecting a phone number in order to take over someone else’s identity TRVF - for use when you are transferring money and you want to check to see if it is approved by sending a text message or phone call to your end user. This is similar to CHBK, but is specifically for a money transaction UNKN - if you have a situation not addressed by other tags (same as OTHR)
OPTIONALYour end user’s IP address (do not send your own IP address). IPv4 and IPv6 are supported. For IPv4, the value must be in the format defined by the Internet Engineering Task Force (IETF) in the Internet-Draft document titled Internet Protocol. For IPv6, the value must be in the format defined by the IETF in the Internet-Draft document titled .
OPTIONALSpecifies the action that you want TeleSign to perform if the phone number has Call Forwarding enabled. Valid values include block and flag. Block - If set to block, TeleSign services abort the verification process immediately, and return the call status code 130 - Call Blocked by TeleSign. Flag - If set to flag, then TeleSign continues the verification process as usual. This also returns an indicator identifying the phone number as having Call Forwarding enabled, giving you the option of processing the phone number. [Default] TeleSign processes the verification request by performing a Call Forwarding detection check.
OPTIONALThe IETF language tag used in applying predefined templates. For a complete list of language tags, see the section Supported Languages for Messages on the Codes, Languages, and Time Zones (REST) page.
OPTIONALThis message is to be used in conjunction with prompt_digit. You provide a message to play, it is converted to text-to-speech and sent in a call and played for the end user. You are limited to 2000 code points. The message should contain the digit you want to press. For example, you might have the message - Press 7 to continue. Make sure the digit in your message matches the digit you send for prompt_digit. If the end user presses the correct digit, then the message you have for the message parameter plays. If the end user does not press the correct digit, the follow up message does not play. All messages use the same voice tag if you choose to include one. NOTE: Do not use this feature with the language tag option.
OPTIONALThis digit is to be used in conjunction with prompt_message. Provide a single digit 0-9 that you want the end user to press. After playing the prompt message, the system will wait and give the end user two chances to press the correct digit. If they do, the message in the message parameter plays. All messages use the same voice tag if you choose to include one.
OPTIONALThis parameter allows you to set a phone number as caller ID for a Voice API message sent to your end users. In order to use a specific caller ID, you must purchase a phone number from TeleSign. This can be done by contacting your Technical Account Manager and asking to buy one or more numbers. Be aware that 100% preservation of a caller ID value is not guaranteed. TeleSign or a terminating operator may override the caller ID value that your end user will receive in order to improve delivery quality or follow local Telecom regulations in particular countries. Learn how to buy a number to use as caller id in the Buy a Phone Number (Caller ID) section of this page.
OPTIONALAllows you to pass a text-to-speech (TTS) message. By default, TeleSign sends a scripted message to the phone. Messages default to en-US, unless otherwise stated by the language parameter. The default message is “Hello. Thank you for using our phone verification system. Your code is [code]. Once again, your code is [code]. Goodbye.” To generate a TeleSign assigned validation code (this is recommended), include $$CODE$$ in the message string. This generates a random string with the appropriate length as part of the TTS message.For a list of languages, see the section Supported Languages for Messages on the Codes, Languages, and Time Zones (REST) page. For tips relating to creating TTS messages, see Text-to-Speech (TTS) Hints below.
OPTIONALPressX is a feature that allows you to send an end user a message that asks them to press a digit in order to hear their verification code. The message is in English, and as follows: Hello. Thank you for using the phone verification system. Please press digit to hear your code. The digit is randomly selected by TeleSign, and the end user gets two tries to get the correct digit. If the end user presses the correct digit, they will receive a message containing their verification code. Please note that this feature is only available in English, so you cannot use a language tag for other languages with it. To use this feature, you would put pressx=1 in the body of your request. You cannot use this feature with TTS.
OPTIONALIt is not an issue when a user’s phone number belongs to a modern Private Branch Exchange (PBX) because outside numbers are usually assigned to individual extensions. Older PBX systems on the other hand, require extra call processing because incoming calls require either a live switchboard operator or an automated attendant to request the number of the user’s extension before completing the call. By default, TeleSign does not support older PBX systems, but you can enable support for either live or automated switchboard scenarios by including the extension_type parameter. When you use this parameter, you must also use extension_template.
OPTIONALA numerical string that specifies the extension used in the call, as described above. If the user must be reached at an extension, then use this parameter to specify the extension number. The extension string is composed of digits. You may use a maximum of 28 characters to specify your extension. For the extension_type=1 (DTMF digits are dialed), you can include commas in the extension number string, where each comma represents a one second pause in the dialing sequence.
.header("X-RapidAPI-Host", "telesign-telesign-voice-verify-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "ログインしてキーを取得")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);




$ npm install unirest


var unirest = require('unirest');


.header("X-RapidAPI-Host", "telesign-telesign-voice-verify-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "ログインしてキーを取得")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);