sendOTPMessage method

Future<SendOTPMessageResponse> sendOTPMessage({
  1. required String applicationId,
  2. required SendOTPMessageRequestParameters sendOTPMessageRequestParameters,
})

Send an OTP message

May throw BadRequestException. May throw ForbiddenException. May throw InternalServerErrorException. May throw MethodNotAllowedException. May throw NotFoundException. May throw PayloadTooLargeException. May throw TooManyRequestsException.

Parameter applicationId : The unique ID of your Amazon Pinpoint application.

Implementation

Future<SendOTPMessageResponse> sendOTPMessage({
  required String applicationId,
  required SendOTPMessageRequestParameters sendOTPMessageRequestParameters,
}) async {
  final response = await _protocol.sendRaw(
    payload: sendOTPMessageRequestParameters,
    method: 'POST',
    requestUri: '/v1/apps/${Uri.encodeComponent(applicationId)}/otp',
    exceptionFnMap: _exceptionFns,
  );
  final $json = await _s.jsonFromResponse(response);
  return SendOTPMessageResponse(
    messageResponse: MessageResponse.fromJson($json),
  );
}