Pinpoint / Client / phone_number_validate
phone_number_validate#
- Pinpoint.Client.phone_number_validate(**kwargs)#
Retrieves information about a phone number.
See also: AWS API Documentation
Request Syntax
response = client.phone_number_validate( NumberValidateRequest={ 'IsoCountryCode': 'string', 'PhoneNumber': 'string' } )
- Parameters:
NumberValidateRequest (dict) –
[REQUIRED]
Specifies a phone number to validate and retrieve information about.
IsoCountryCode (string) –
The two-character code, in ISO 3166-1 alpha-2 format, for the country or region where the phone number was originally registered.
PhoneNumber (string) –
The phone number to retrieve information about. The phone number that you provide should include a valid numeric country code. Otherwise, the operation might result in an error.
- Return type:
dict
- Returns:
Response Syntax
{ 'NumberValidateResponse': { 'Carrier': 'string', 'City': 'string', 'CleansedPhoneNumberE164': 'string', 'CleansedPhoneNumberNational': 'string', 'Country': 'string', 'CountryCodeIso2': 'string', 'CountryCodeNumeric': 'string', 'County': 'string', 'OriginalCountryCodeIso2': 'string', 'OriginalPhoneNumber': 'string', 'PhoneType': 'string', 'PhoneTypeCode': 123, 'Timezone': 'string', 'ZipCode': 'string' } }
Response Structure
(dict) –
The request succeeded.
NumberValidateResponse (dict) –
Provides information about a phone number.
Carrier (string) –
The carrier or service provider that the phone number is currently registered with. In some countries and regions, this value may be the carrier or service provider that the phone number was originally registered with.
City (string) –
The name of the city where the phone number was originally registered.
CleansedPhoneNumberE164 (string) –
The cleansed phone number, in E.164 format, for the location where the phone number was originally registered.
CleansedPhoneNumberNational (string) –
The cleansed phone number, in the format for the location where the phone number was originally registered.
Country (string) –
The name of the country or region where the phone number was originally registered.
CountryCodeIso2 (string) –
The two-character code, in ISO 3166-1 alpha-2 format, for the country or region where the phone number was originally registered.
CountryCodeNumeric (string) –
The numeric code for the country or region where the phone number was originally registered.
County (string) –
The name of the county where the phone number was originally registered.
OriginalCountryCodeIso2 (string) –
The two-character code, in ISO 3166-1 alpha-2 format, that was sent in the request body.
OriginalPhoneNumber (string) –
The phone number that was sent in the request body.
PhoneType (string) –
The description of the phone type. Valid values are: MOBILE, LANDLINE, VOIP, INVALID, PREPAID, and OTHER.
PhoneTypeCode (integer) –
The phone type, represented by an integer. Valid values are: 0 (mobile), 1 (landline), 2 (VoIP), 3 (invalid), 4 (other), and 5 (prepaid).
Timezone (string) –
The time zone for the location where the phone number was originally registered.
ZipCode (string) –
The postal or ZIP code for the location where the phone number was originally registered.
Exceptions