optInPhoneNumber method

Future<void> optInPhoneNumber({
  1. required String phoneNumber,
})

Use this request to opt in a phone number that is opted out, which enables you to resume sending SMS messages to the number.

You can opt in a phone number only once every 30 days.

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

Parameter phoneNumber : The phone number to opt in.

Implementation

Future<void> optInPhoneNumber({
  required String phoneNumber,
}) async {
  ArgumentError.checkNotNull(phoneNumber, 'phoneNumber');
  final $request = <String, dynamic>{};
  $request['phoneNumber'] = phoneNumber;
  await _protocol.send(
    $request,
    action: 'OptInPhoneNumber',
    version: '2010-03-31',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['OptInPhoneNumberInput'],
    shapes: shapes,
    resultWrapper: 'OptInPhoneNumberResult',
  );
}