SNS / Client / list_phone_numbers_opted_out
list_phone_numbers_opted_out¶
- SNS.Client.list_phone_numbers_opted_out(**kwargs)¶
Returns a list of phone numbers that are opted out, meaning you cannot send SMS messages to them.
The results for
ListPhoneNumbersOptedOutare paginated, and each page returns up to 100 phone numbers. If additional phone numbers are available after the first page of results, then aNextTokenstring will be returned. To receive the next page, you callListPhoneNumbersOptedOutagain using theNextTokenstring received from the previous call. When there are no more records to return,NextTokenwill be null.See also: AWS API Documentation
Request Syntax
response = client.list_phone_numbers_opted_out( nextToken='string' )
- Parameters:
nextToken (string) – A
NextTokenstring is used when you call theListPhoneNumbersOptedOutaction to retrieve additional records that are available after the first page of results.- Return type:
dict
- Returns:
Response Syntax
{ 'phoneNumbers': [ 'string', ], 'nextToken': 'string' }
Response Structure
(dict) –
The response from the
ListPhoneNumbersOptedOutaction.phoneNumbers (list) –
A list of phone numbers that are opted out of receiving SMS messages. The list is paginated, and each page can contain up to 100 phone numbers.
(string) –
nextToken (string) –
A
NextTokenstring is returned when you call theListPhoneNumbersOptedOutaction if additional records are available after the first page of results.
Exceptions
SNS.Client.exceptions.ThrottledExceptionSNS.Client.exceptions.InternalErrorExceptionSNS.Client.exceptions.AuthorizationErrorExceptionSNS.Client.exceptions.InvalidParameterException