getOtp method

Future<String> getOtp()

Implementation

Future<String> getOtp() async {
  final json = await _requestJson('GET', '/api/otp');
  final otp = json['otp']?.toString();
  if (otp == null || otp.isEmpty) {
    throw ApiClientException('OTP missing in response', body: json);
  }
  return otp;
}