新規登録​

ログイン​

Twilio

FREE
開発者​ serg.osipchuk
更新日 6ヶ月前​
SMS
-/10
人気度​
-
レイテンシ​
-
正常稼働率​

Twilio API Documentation

SMS、音声、ビデオ、IPメッセージングをプログラム可能にします。

全文を​表示する​

さらに​魅力的な​アプリ開発を​

世界最大級の​APIマーケットプレイスで、​8,000以上の​豊富な​ラインナップから​APIを​検索、​簡単に​接続​しましょう​

POSTmakeCall
POSTsendMms
POSTsendSms
POSTwebhookEvent
POSTmakeCall

このブロックでは、音声通話を行うことができます。

ログインして​このエンドポイントを​テストする​
ログイン​
ヘッダーパラメータ​
X-RapidAPI-KeySTRING
REQUIRED
必須パラメータ​
accountSidCREDENTIALS
REQUIREDA 34 character string that uniquely identifies this account.
fromSTRING
REQUIREDThe phone number or client identifier to use as the caller id. If using a phone number, it must be a Twilio number or a Verified outgoing caller id for your account.
urlSTRING
REQUIREDThe fully qualified URL that should be consulted when the call connects. Just like when you set a URL on a phone number for handling inbound calls. See the Url Parameter section below for more details.
accountTokenCREDENTIALS
REQUIREDThe authorization token for this account.
toSTRING
REQUIREDThe phone number, SIP address or client identifier to call.
パラメータ(Option)​
methodSTRING
OPTIONALThe HTTP method Twilio should use when making its request to the above Url parameter's value. Defaults to POST. If an ApplicationSid parameter is present, this parameter is ignored.
fallbackMethodSTRING
OPTIONALThe HTTP method that Twilio should use to request the FallbackUrl. Must be either GET or POST. Defaults to POST. If an ApplicationSid parameter is present, this parameter is ignored.
recordBOOLEAN
OPTIONALSet this parameter to 'true' to record the entirety of a phone call.
sendDigitsSTRING
OPTIONALA string of keys to dial after connecting to the number, maximum of 32 digits.
recordingStatusCallbackSTRING
OPTIONALThe recordingStatusCallback attribute takes an absolute URL as an argument.
statusCallbackMethodSTRING
OPTIONALThe HTTP method Twilio should use when requesting the above URL. Defaults to POST. If an ApplicationSid parameter is present, this parameter is ignored.
statusCallbackEventSTRING
OPTIONALThe call progress events that Twilio will send webhooks on. Available values are initiated, ringing, answered, and completed.
fallbackUrlSTRING
OPTIONALA URL that Twilio will request if an error occurs requesting or executing the TwiML at Url. If an ApplicationSid parameter is present, this parameter is ignored.
applicationSidSTRING
OPTIONALRequired if url not provided. The 34 character sid of the application Twilio should use to handle this phone call. If this parameter is present, Twilio will ignore all of the voice URLs passed and use the URLs set on the application.
recordingChannelsSELECT
OPTIONALMono or dual. Set this parameter to specify the number of channels in the final recording. Defaults to 'mono'.
timeoutSTRING
OPTIONALThe integer number of seconds that Twilio should allow the phone to ring before assuming there is no answer.
statusCallbackSTRING
OPTIONALA URL that Twilio will send asynchronous webhook requests to on every call event specified in the StatusCallbackEvent parameter. If no event is present, Twilio will send completed by default. If an ApplicationSid parameter is present, this parameter is ignored. URLs must contain a valid hostname.
recordingStatusCallbackMethodSTRING
OPTIONALThe HTTP method Twilio should use when requesting the above URL. Defaults to POST
コードスニペット​
unirest.post("https://Twilioserg.osipchukV1.p.rapidapi.com/makeCall")
.header("X-RapidAPI-Key", "undefined")
.header("Content-Type", "application/x-www-form-urlencoded")
.send("method=undefined")
.send("fallbackMethod=undefined")
.send("record=undefined")
.send("sendDigits=undefined")
.send("recordingStatusCallback=undefined")
.send("statusCallbackMethod=undefined")
.send("statusCallbackEvent=undefined")
.send("fallbackUrl=undefined")
.send("applicationSid=undefined")
.send("recordingChannels=undefined")
.send("timeout=undefined")
.send("statusCallback=undefined")
.send("recordingStatusCallbackMethod=undefined")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
サンプルレスポンス​

loading...

ログイン​新規登録​

SDKを​インストール(NodeJS)​

インストール​

Node.jsで​Unirestを​使用​するには、​NPMモジュールを​インストール​してください。​

$ npm install unirest

インストール​完了後は、​簡単に​リクエストを​行うことが​できるように​なります。​

var unirest = require('unirest');

リクエスト​

unirest.post("https://Twilioserg.osipchukV1.p.rapidapi.com/makeCall")
.header("X-RapidAPI-Key", "undefined")
.header("Content-Type", "application/x-www-form-urlencoded")
.send("method=undefined")
.send("fallbackMethod=undefined")
.send("record=undefined")
.send("sendDigits=undefined")
.send("recordingStatusCallback=undefined")
.send("statusCallbackMethod=undefined")
.send("statusCallbackEvent=undefined")
.send("fallbackUrl=undefined")
.send("applicationSid=undefined")
.send("recordingChannels=undefined")
.send("timeout=undefined")
.send("statusCallback=undefined")
.send("recordingStatusCallbackMethod=undefined")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2認証​
クライアントID​
クライアントシークレット​
OAuth2認証​
Sign up for freeto test this endpoint
Join the world’s largest API marketplace with over half a million developers and thousands of APIs.
APIを​検索​
ブラウザ上で​即座にテスト​
接続用スニペットの​自動生成​
ダッシュボードで​一括管理​