Chime / Client / search_available_phone_numbers
search_available_phone_numbers#
- Chime.Client.search_available_phone_numbers(**kwargs)#
Searches for phone numbers that can be ordered. For US numbers, provide at least one of the following search filters:
AreaCode
,City
,State
, orTollFreePrefix
. If you provideCity
, you must also provideState
. Numbers outside the US only support thePhoneNumberType
filter, which you must use.See also: AWS API Documentation
Request Syntax
response = client.search_available_phone_numbers( AreaCode='string', City='string', Country='string', State='string', TollFreePrefix='string', PhoneNumberType='Local'|'TollFree', MaxResults=123, NextToken='string' )
- Parameters:
AreaCode (string) – The area code used to filter results. Only applies to the US.
City (string) – The city used to filter results. Only applies to the US.
Country (string) – The country used to filter results. Defaults to the US Format: ISO 3166-1 alpha-2.
State (string) – The state used to filter results. Required only if you provide
City
. Only applies to the US.TollFreePrefix (string) – The toll-free prefix that you use to filter results. Only applies to the US.
PhoneNumberType (string) – The phone number type used to filter results. Required for non-US numbers.
MaxResults (integer) – The maximum number of results to return in a single call.
NextToken (string) – The token used to retrieve the next page of results.
- Return type:
dict
- Returns:
Response Syntax
{ 'E164PhoneNumbers': [ 'string', ], 'NextToken': 'string' }
Response Structure
(dict) –
E164PhoneNumbers (list) –
List of phone numbers, in E.164 format.
(string) –
NextToken (string) –
The token used to retrieve the next page of search results.
Exceptions