checkIfPhoneNumberIsOptedOut method
Future<CheckIfPhoneNumberIsOptedOutResponse>
checkIfPhoneNumberIsOptedOut({
- required String phoneNumber,
Accepts a phone number and indicates whether the phone holder has opted out of receiving SMS messages from your 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 ThrottledException. May throw InternalErrorException. May throw AuthorizationErrorException. May throw InvalidParameterException.
Parameter phoneNumber
:
The phone number for which you want to check the opt out status.
Implementation
Future<CheckIfPhoneNumberIsOptedOutResponse> checkIfPhoneNumberIsOptedOut({
required String phoneNumber,
}) async {
ArgumentError.checkNotNull(phoneNumber, 'phoneNumber');
final $request = <String, dynamic>{};
$request['phoneNumber'] = phoneNumber;
final $result = await _protocol.send(
$request,
action: 'CheckIfPhoneNumberIsOptedOut',
version: '2010-03-31',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['CheckIfPhoneNumberIsOptedOutInput'],
shapes: shapes,
resultWrapper: 'CheckIfPhoneNumberIsOptedOutResult',
);
return CheckIfPhoneNumberIsOptedOutResponse.fromXml($result);
}