メニュー

Expand
ページを評価:

Application Resource

An Application instance resource represents an application that you have created with Twilio. An application inside of Twilio is a set of URLs and other configuration data that tells Twilio how to behave when one of your Twilio numbers receives a call or SMS message. This configuration data is the same configuration data that exists on IncomingPhoneNumber resources: VoiceUrl, VoiceMethod, VoiceFallbackUrl, VoiceFallbackMethod, StatusCallback, StatusCallbackMethod, VoiceCallerIdLookup, SmsUrl, SmsMethod, SmsFallbackUrl, SmsFallbackMethod, and SmsStatusCallback.

Application のリスト リソースは、あるアカウントの Twilio アプリケーションのセットを表現します。 新しいアプリケーションを作成するには、このリスト リソースに POST します。アカウントには最大 1000 個のアプリケーションを作成できます。

アプリケーションは、複数の電話番号にまたがって使用するコンフィグレーション情報をカプセル化する際に使えます。 ApplicationSid を IncomingPhoneNumber に割り当てることで、Twilio に対して、IncomingPhoneNumber に設定された URL の代わりに、アプリケーションの URL を使用するよう指示できます。 アプリケーションを作成し、VoiceUrl をhttp://myapp.com/answer にセットします。このアプリケーションをすべての自分の電話番号に割り当てると、通話が着信するたびに、Twilio は この URL へリクエストを送信します。

Application properties

Resource Properties in REST API format
account_sid
sid<AC> Not PII

The SID of the Account that created the Application resource.

api_version
文字列 Not PII

The API version used to start a new TwiML session.

date_created
date_time<rfc2822> Not PII

The date and time in GMT that the resource was created specified in RFC 2822 format.

date_updated
date_time<rfc2822> Not PII

The date and time in GMT that the resource was last updated specified in RFC 2822 format.

friendly_name
文字列 Not PII

The string that you assigned to describe the resource.

message_status_callback
url Not PII

The URL we call using a POST method to send message status information to your application.

sid
sid<AP> Not PII

The unique string that that we created to identify the Application resource.

sms_fallback_method
http_method Not PII

The HTTP method we use to call sms_fallback_url. Can be: GET or POST.

sms_fallback_url
url Not PII

The URL that we call when an error occurs while retrieving or executing the TwiML from sms_url.

sms_method
http_method Not PII

The HTTP method we use to call sms_url. Can be: GET or POST.

sms_status_callback
url Not PII

The URL we call using a POST method to send status information to your application about SMS messages that refer to the application.

sms_url
url Not PII

The URL we call when the phone number receives an incoming SMS message.

status_callback
url Not PII

The URL we call using the status_callback_method to send status information to your application.

status_callback_method
http_method Not PII

The HTTP method we use to call status_callback. Can be: GET or POST.

uri
uri Not PII

The URI of the resource, relative to https://api.twilio.com.

voice_caller_id_lookup
boolean Not PII

Whether we look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: true or false.

voice_fallback_method
http_method Not PII

The HTTP method we use to call voice_fallback_url. Can be: GET or POST.

voice_fallback_url
url Not PII

The URL that we call when an error occurs retrieving or executing the TwiML requested by url.

voice_method
http_method Not PII

The HTTP method we use to call voice_url. Can be: GET or POST.

voice_url
url Not PII

The URL we call when the phone number assigned to this application receives a call.

Create an Application resource

post
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Applications.json

アカウント内で新しいアプリケーションを作成します。

リクエストが成功すると、Twilio は新しいアプリケーションの表現を返します。

パラメーター
Parameters in REST API format
account_sid
Path
post sid<AC> Not PII

The SID of the Account that will create the resource.

api_version
オプション
post 文字列 Not PII

The API version to use to start a new TwiML session. Can be: 2010-04-01 or 2008-08-01. The default value is the account's default API version.

voice_url
オプション
post url Not PII

The URL we should call when the phone number assigned to this application receives a call.

voice_method
オプション
post http_method Not PII

The HTTP method we should use to call voice_url. Can be: GET or POST.

voice_fallback_url
オプション
post url Not PII

The URL that we should call when an error occurs retrieving or executing the TwiML requested by url.

voice_fallback_method
オプション
post http_method Not PII

The HTTP method we should use to call voice_fallback_url. Can be: GET or POST.

status_callback
オプション
post url Not PII

The URL we should call using the status_callback_method to send status information to your application.

status_callback_method
オプション
post http_method Not PII

The HTTP method we should use to call status_callback. Can be: GET or POST.

voice_caller_id_lookup
オプション
post boolean Not PII

Whether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: true or false.

sms_url
オプション
post url Not PII

The URL we should call when the phone number receives an incoming SMS message.

sms_method
オプション
post http_method Not PII

The HTTP method we should use to call sms_url. Can be: GET or POST.

sms_fallback_url
オプション
post url Not PII

The URL that we should call when an error occurs while retrieving or executing the TwiML from sms_url.

sms_fallback_method
オプション
post http_method Not PII

The HTTP method we should use to call sms_fallback_url. Can be: GET or POST.

sms_status_callback
オプション
post url Not PII

The URL we should call using a POST method to send status information about SMS messages sent by the application.

message_status_callback
オプション
post url Not PII

The URL we should call using a POST method to send message status information to your application.

friendly_name
オプション
post 文字列 Not PII

A descriptive string that you create to describe the new application. It can be up to 64 characters long.

例 1
        
        
        
        

        Fetch an Application resource

        GET
        https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json
        パラメーター
        Parameters in REST API format
        account_sid
        Path
        GET sid<AC> Not PII

        The SID of the Account that created the Application resource to fetch.

        sid
        Path
        GET sid<AP> Not PII

        The Twilio-provided string that uniquely identifies the Application resource to fetch.

        例 1
              
              
              
              

              Read multiple Application resources

              GET
              https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Applications.json

              Application リソース表現のリストを返します。各項目は、アカウント内のアプリケーションを表現します。 このリストは ページ情報を含みます。

              パラメーター
              Parameters in REST API format
              account_sid
              Path
              GET sid<AC> Not PII

              The SID of the Account that created the Application resources to read.

              friendly_name
              オプション
              GET 文字列 Not PII

              The string that identifies the Application resources to read.

              例 1
                    
                    
                    
                    
                    例 2
                          
                          
                          
                          

                          Update an Application resource

                          post
                          https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json

                          アプリケーションのプロパティを更新します。更新に成功すると、更新されたリソース表現を返します。 返却されるレスポンスは、GET リクエストを送信した場合と同じです。

                          パラメーター
                          Parameters in REST API format
                          account_sid
                          Path
                          post sid<AC> Not PII

                          The SID of the Account that created the Application resources to update.

                          sid
                          Path
                          post sid<AP> Not PII

                          The Twilio-provided string that uniquely identifies the Application resource to update.

                          friendly_name
                          オプション
                          post 文字列 Not PII

                          A descriptive string that you create to describe the resource. It can be up to 64 characters long.

                          api_version
                          オプション
                          post 文字列 Not PII

                          The API version to use to start a new TwiML session. Can be: 2010-04-01 or 2008-08-01. The default value is your account's default API version.

                          voice_url
                          オプション
                          post url Not PII

                          The URL we should call when the phone number assigned to this application receives a call.

                          voice_method
                          オプション
                          post http_method Not PII

                          The HTTP method we should use to call voice_url. Can be: GET or POST.

                          voice_fallback_url
                          オプション
                          post url Not PII

                          The URL that we should call when an error occurs retrieving or executing the TwiML requested by url.

                          voice_fallback_method
                          オプション
                          post http_method Not PII

                          The HTTP method we should use to call voice_fallback_url. Can be: GET or POST.

                          status_callback
                          オプション
                          post url Not PII

                          The URL we should call using the status_callback_method to send status information to your application.

                          status_callback_method
                          オプション
                          post http_method Not PII

                          The HTTP method we should use to call status_callback. Can be: GET or POST.

                          voice_caller_id_lookup
                          オプション
                          post boolean Not PII

                          Whether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: true or false.

                          sms_url
                          オプション
                          post url Not PII

                          The URL we should call when the phone number receives an incoming SMS message.

                          sms_method
                          オプション
                          post http_method Not PII

                          The HTTP method we should use to call sms_url. Can be: GET or POST.

                          sms_fallback_url
                          オプション
                          post url Not PII

                          The URL that we should call when an error occurs while retrieving or executing the TwiML from sms_url.

                          sms_fallback_method
                          オプション
                          post http_method Not PII

                          The HTTP method we should use to call sms_fallback_url. Can be: GET or POST.

                          sms_status_callback
                          オプション
                          post url Not PII

                          Same as message_status_callback: The URL we should call using a POST method to send status information about SMS messages sent by the application. Deprecated, included for backwards compatibility.

                          message_status_callback
                          オプション
                          post url Not PII

                          The URL we should call using a POST method to send message status information to your application.

                          例 1
                                
                                
                                
                                

                                Delete an Application resource

                                削除する
                                https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json

                                このアプリケーションを削除します。 IncoimngPhoneNumber リソースに、このアプリケーションの sid を VoiceApplicationSid または SmsApplicatonSid として割り当てている場合、このアプリケーションの sid は削除されます。

                                削除に成功すると、ボディーのない HTTP 204 レスポンスを返します。

                                パラメーター
                                Parameters in REST API format
                                account_sid
                                Path
                                削除する sid<AC> Not PII

                                The SID of the Account that created the Application resources to delete.

                                sid
                                Path
                                削除する sid<AP> Not PII

                                The Twilio-provided string that uniquely identifies the Application resource to delete.

                                例 1
                                      
                                      
                                      
                                      
                                      ページを評価:

                                      ヘルプが必要ですか?

                                      誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。

                                            
                                            
                                            

                                            フィードバックくださりありがとうございます!

                                            We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

                                            Sending your feedback...
                                            🎉 Thank you for your feedback!
                                            Something went wrong. Please try again.

                                            Thanks for your feedback!

                                            Refer us and get $10 in 3 simple steps!

                                            ステップ1

                                            Get link

                                            Get a free personal referral link here

                                            ステップ2:

                                            Give $10

                                            Your user signs up and upgrade using link

                                            ステップ3

                                            Get $10

                                            1,250 free SMSes
                                            OR 1,000 free voice mins
                                            OR 12,000 chats
                                            OR more