メニュー

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

A 34 character string that uniquely identifies this Phone Number (e.g. PN1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d).

accountSid
sid<AC> Not PII

The unique SID identifier of the Account.

serviceSid
sid<KS> Not PII

The unique SID identifier of the parent Service.

dateCreated
date_time<iso8601> Not PII

The date that this Phone Number was added to the service, given in ISO 8601 format.

dateUpdated
date_time<iso8601> Not PII

The date that this Phone Number was updated, given in ISO 8601 format.

phoneNumber
phone_number Not PII

The phone number. Phone numbers are in E.164 format (e.g. +16175551212).

friendlyName
文字列 Not PII

A human-readable description of this resource, up to 64 characters.

isoCountry
文字列 Not PII

The ISO Country Code for this phone number.

capabilities
phone_number_capabilities Not PII

A list of capabilities of this phone number.

url
url Not PII

The URL of this resource.

isReserved
boolean Not PII

Whether or not the number should be excluded from being assigned to a participant using proxy pool logic. See Reserved Phone Numbers 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 unique SID identifier of the parent Service.

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

A Twilio IncomingPhoneNumber Sid that represents the Twilio Number you would like to assign to your Proxy Service (e.g. PN1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d).

phone_number
オプション
post phone_number Not PII

A string that represents the Twilio Number you would like to assign to your Proxy Service. Provide number in E.164 format (e.g. +16175551212).

is_reserved
オプション
post boolean Not PII

Whether or not the number should be excluded from being 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 unique SID identifier of the parent Service.

              sid
              必須
              GET sid<PN> Not PII

              A 34 character string that uniquely identifies the Phone Number to fetch (e.g. PN1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d).

                    
                    
                    
                    

                    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 unique SID identifier of the parent Service.

                          
                          
                          
                          

                          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 unique SID identifier of the parent Service.

                          sid
                          必須
                          post sid<PN> Not PII

                          A 34 character string that uniquely identifies the Phone Number to remove from the Proxy Service (e.g. PN1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d).

                          is_reserved
                          オプション
                          post boolean Not PII

                          Whether or not the number should be excluded from being 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 unique SID identifier of the parent Service.

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

                                A 34 character string that uniquely identifies the Phone Number to remove from the Proxy Service (e.g. PN1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d).

                                      
                                      
                                      
                                      
                                      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.