checkIfPhoneNumberIsOptedOut method

Future<CheckIfPhoneNumberIsOptedOutResponse> checkIfPhoneNumberIsOptedOut({
  1. required String phoneNumber,
})

Accepts a phone number and indicates whether the phone holder has opted out of receiving SMS messages from your Amazon Web Services account. You cannot send SMS messages to a number that is opted out.

To resume sending messages, you can opt in the number by using the OptInPhoneNumber action.

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

Parameter phoneNumber : The phone number for which you want to check the opt out status.

Implementation

Future<CheckIfPhoneNumberIsOptedOutResponse> checkIfPhoneNumberIsOptedOut({
  required String phoneNumber,
}) async {
  final $request = <String, String>{
    'phoneNumber': phoneNumber,
  };
  final $result = await _protocol.send(
    $request,
    action: 'CheckIfPhoneNumberIsOptedOut',
    version: '2010-03-31',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    resultWrapper: 'CheckIfPhoneNumberIsOptedOutResult',
  );
  return CheckIfPhoneNumberIsOptedOutResponse.fromXml($result);
}