Resend OTP

šŸ” Resend OTP

Allow user to resend OTP if ENABLE_RESEND_ACTIVATION_CODE in the challengeInfo received in payload of getActivationCode callback is set to true

šŸ“˜ Use Case

  • User fails to receive an activation code during onboarding or device registration.
  • User wants to retry without restarting the process.

šŸ” resendActivationCode API

The resendActivationCode API is used when the user has not received their activation code (OTP) via email or SMS and requests a new one.

Calling this method sends a new OTP to the user and triggers a new getActivationCode event


šŸ“± Platform-specific Usage - resendActivationCode

šŸ’™ React Native
RdnaClient.resendActivationCode((syncResponse) => {
  console.log("Resend result:", syncResponse);
});
🟣 Flutter
rdnaClient.resendActivationCode();
🧩 Cordova
com.uniken.rdnaplugin.RdnaClient.resendActivationCode(
  () => console.log("OTP resent"),
  (err) => console.log("Resend failed", err)
);
šŸ iOS (Objective-C)
RDNAError *error = [rdnaInstance resendActivationCode];
šŸ¤– Android (Java)
RDNAError error = rdna.resendActivationCode();

šŸ”„ What Happens Next?

  • The SDK will retrigger the getActivationCode event.
  • Your app will receive new:
    • verificationKey
    • attemptsLeft
    • Updated challengeInfo


šŸ“¤ Return Type

PlatformReturn Type
React Nativesync callback
Fluttervoid (async call)
Cordovasuccess/error callback
iOSRDNAError *
AndroidRDNA.RDNAError

āš ļø Notes

  • Ensure the user is eligible for OTP resend (based on app flow or ENABLE_RESEND_ACTIVATION_CODE flag).
  • Resend intervals or limits may apply (as configured server-side).
  • Typically used from the OTP input screen.

āœ… Best Practices

  • Prompt user clearly for OTP input.
  • Use attemptsLeft to guide retry attempts.
  • Handle all responses and errors gracefully.