AvailablePhoneNumber resource
The subresources of the AvailablePhoneNumber
resource lets you search for local, toll-free and mobile phone numbers that are available for you to purchase. You can search for phone numbers that match a pattern, are in a certain country, are in certain area code (NPA) or exchange (NXX) or are in a specific geography.
You cannot make requests directly to AvailablePhoneNumber
instance resources. Instead, to find available numbers, make a request to one of the subresources:
Once you've found a number you'd like to purchase (also referred to as provisioning a number or buying the number), you can do so using the Incoming Phone Numbers API.
サポートされる国とタイプ
You can query the AvailablePhoneNumber
resource to get a list of subresources available for your account by ISO Country. For full information about our phone number support, see our Phone Number CSV or the FAQ. Each instance of the resource will have the following properties.
Names in REST API format | |
---|---|
country_code
|
The ISO-3166-1 country code of the country. |
country
|
The name of the country. |
uri
|
The URI of the Country resource, relative to |
beta
|
Whether all phone numbers available in the country are new to the Twilio platform. |
subresource_uris
|
A list of related AvailablePhoneNumber resources identified by their URIs relative to |
Fetch a specific country
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}.json
パラメーター
Names in REST API format | |
---|---|
account_sid
Path
|
The SID of the Account requesting the available phone number Country resource. |
country_code
Path
|
The ISO-3166-1 country code of the country to fetch available phone number information about. |
例 1
Read a list of countries
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers.json
パラメーター
Names in REST API format | |
---|---|
account_sid
Path
|
The SID of the Account requesting the available phone number Country resources. |
例 1
ヘルプが必要ですか?
誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。