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.