verifyOtp method
Verify a generic OTP.
Sign the provided TVerifyOtpBody with the client's stamp function and submit the request (POST /public/v1/submit/verify_otp).
See also: stampVerifyOtp.
Implementation
Future<TVerifyOtpResponse> verifyOtp({
required TVerifyOtpBody input,
}) async {
final body = packActivityBody(
bodyJson: input.toJson(),
fallbackOrganizationId: input.organizationId ??
config.organizationId ??
(throw Exception(
"Missing organization ID, please pass in a sub-organizationId or instantiate the client with one.")),
activityType: 'ACTIVITY_TYPE_VERIFY_OTP',
);
return await request<Map<String, dynamic>, TVerifyOtpResponse>(
"/public/v1/submit/verify_otp",
body,
(json) => TVerifyOtpResponse.fromJson(
transformActivityResponse(json, 'VerifyOtp')));
}