メニュー

Rate this page:

Thanks for rating this page!

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

電話番号

With Twilio Proxy, you associate phone numbers (this resource) and short codes directly with a Proxy Service. All added numbers go into the Phone Number Pool associated with a given Proxy Service. For more information on managing the phone numbers in your phone number pool, refer to our Phone Number Management guide.

Serviceに関連づけられた電話番号を控えておく

Proxy Serviceに関連づけられたTwilio電話番号は同じアカウントの他のProxy Serviceに関連づけることはできません。

PhoneNumber properties

Names in PHP format
sid
sid<PN> Not PII

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

accountSid
sid<AC> Not PII

The SID of the Account that created the PhoneNumber resource.

serviceSid
sid<KS> Not PII

The SID of the PhoneNumber resource's parent Service resource.

dateCreated
date_time<iso8601> Not PII

The ISO 8601 date and time in GMT when the resource was created.

dateUpdated
date_time<iso8601> Not PII

The ISO 8601 date and time in GMT when the resource was last updated.

phoneNumber
phone_number Not PII

The phone number in E.164 format, which consists of a + followed by the country code and subscriber number.

friendlyName
文字列 Not PII

The string that you assigned to describe the resource.

isoCountry
文字列 Not PII

The ISO Country Code for the phone number.

capabilities
phone_number_capabilities Not PII

The capabilities of the phone number.

url
url Not PII

The absolute URL of the PhoneNumber resource.

isReserved
boolean Not PII

Whether the phone number should be reserved and not be assigned to a participant using proxy pool logic. See Reserved Phone Numbers for more information.

inUse
integer Not PII

The number of open session assigned to the number. See the How many Phone Numbers do I need? guide for more information.

Proxy Serviceに電話番号を追加する

post
https://proxy.twilio.com/v1/Services/{ServiceSid}/PhoneNumbers
パラメーター
Names in None format
service_sid
必須
post sid<KS> Not PII

The SID parent Service resource of the new PhoneNumber resource.

sid
オプション
post sid<PN> Not PII

The SID of a Twilio IncomingPhoneNumber resource that represents the Twilio Number you would like to assign to your Proxy Service.

phone_number
オプション
post phone_number Not PII

The phone number in E.164 format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234.

is_reserved
オプション
post boolean Not PII

Whether the new phone number should be reserved and not be assigned to a participant using proxy pool logic. See Reserved Phone Numbers for more information.

例 1
        
        
        
        
        例 2
              
              
              
              

              Note: You should pass a PhoneNumber or a Sid (identifying a phone number on your account). Only one of them is required. Passing both will return an error.

              Fetch a PhoneNumber resource

              GET
              https://proxy.twilio.com/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}
              パラメーター
              Names in None format
              service_sid
              必須
              GET sid<KS> Not PII

              The SID of the parent Service of the PhoneNumber resource to fetch.

              sid
              必須
              GET sid<PN> Not PII

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

                    
                    
                    
                    

                    Get the list of Phone Numbers associated with a Proxy Service

                    GET
                    https://proxy.twilio.com/v1/Services/{ServiceSid}/PhoneNumbers
                    パラメーター
                    Names in None format
                    service_sid
                    必須
                    GET sid<KS> Not PII

                    The SID of the parent Service of the PhoneNumber resources to read.

                          
                          
                          
                          

                          Update a PhoneNumber resource

                          post
                          https://proxy.twilio.com/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}
                          パラメーター
                          Names in None format
                          service_sid
                          必須
                          post sid<KS> Not PII

                          The SID of the parent Service of the PhoneNumber resource to update.

                          sid
                          必須
                          post sid<PN> Not PII

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

                          is_reserved
                          オプション
                          post boolean Not PII

                          Whether the phone number should be reserved and not be assigned to a participant using proxy pool logic. See Reserved Phone Numbers for more information.

                                
                                
                                
                                

                                Remove a Phone Number from a Proxy Service

                                削除する
                                https://proxy.twilio.com/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}
                                パラメーター
                                Names in None format
                                service_sid
                                必須
                                削除する sid<KS> Not PII

                                The SID of the parent Service of the PhoneNumber resource to delete.

                                sid
                                必須
                                削除する sid<PN> Not PII

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

                                      
                                      
                                      
                                      
                                      Rate this page:

                                      ヘルプが必要ですか?

                                      We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.