listPhoneNumbersOptedOut method

Future<ListPhoneNumbersOptedOutResponse> listPhoneNumbersOptedOut({
  1. String? nextToken,
})

Returns a list of phone numbers that are opted out, meaning you cannot send SMS messages to them.

The results for ListPhoneNumbersOptedOut are paginated, and each page returns up to 100 phone numbers. If additional phone numbers are available after the first page of results, then a NextToken string will be returned. To receive the next page, you call ListPhoneNumbersOptedOut again using the NextToken string received from the previous call. When there are no more records to return, NextToken will be null.

May throw ThrottledException. May throw InternalErrorException. May throw AuthorizationErrorException. May throw InvalidParameterException.

Parameter nextToken : A NextToken string is used when you call the ListPhoneNumbersOptedOut action to retrieve additional records that are available after the first page of results.

Implementation

Future<ListPhoneNumbersOptedOutResponse> listPhoneNumbersOptedOut({
  String? nextToken,
}) async {
  final $request = <String, dynamic>{};
  nextToken?.also((arg) => $request['nextToken'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'ListPhoneNumbersOptedOut',
    version: '2010-03-31',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['ListPhoneNumbersOptedOutInput'],
    shapes: shapes,
    resultWrapper: 'ListPhoneNumbersOptedOutResult',
  );
  return ListPhoneNumbersOptedOutResponse.fromXml($result);
}