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'
}
)
[REQUIRED]
Specifies a phone number to validate and retrieve information about.
The two-character code, in ISO 3166-1 alpha-2 format, for the country or region where the phone number was originally registered.
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.
{
'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
The request succeeded.
Provides information about a phone number.
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.
The name of the city where the phone number was originally registered.
The cleansed phone number, in E.164 format, for the location where the phone number was originally registered.
The cleansed phone number, in the format for the location where the phone number was originally registered.
The name of the country or region where the phone number was originally registered.
The two-character code, in ISO 3166-1 alpha-2 format, for the country or region where the phone number was originally registered.
The numeric code for the country or region where the phone number was originally registered.
The name of the county where the phone number was originally registered.
The two-character code, in ISO 3166-1 alpha-2 format, that was sent in the request body.
The phone number that was sent in the request body.
The description of the phone type. Valid values are: MOBILE, LANDLINE, VOIP, INVALID, PREPAID, and OTHER.
The phone type, represented by an integer. Valid values are: 0 (mobile), 1 (landline), 2 (VoIP), 3 (invalid), 4 (other), and 5 (prepaid).
The time zone for the location where the phone number was originally registered.
The postal or ZIP code for the location where the phone number was originally registered.
Exceptions
Pinpoint.Client.exceptions.BadRequestException
Pinpoint.Client.exceptions.InternalServerErrorException
Pinpoint.Client.exceptions.PayloadTooLargeException
Pinpoint.Client.exceptions.ForbiddenException
Pinpoint.Client.exceptions.NotFoundException
Pinpoint.Client.exceptions.MethodNotAllowedException
Pinpoint.Client.exceptions.TooManyRequestsException