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
resendActivationCode APIThe 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
getActivationCodeevent. - Your app will receive new:
verificationKeyattemptsLeft- Updated
challengeInfo
📤 Return Type
| Platform | Return Type |
|---|---|
| React Native | sync callback |
| Flutter | void (async call) |
| Cordova | success/error callback |
| iOS | RDNAError * |
| Android | RDNA.RDNAError |
⚠️ Notes
- Ensure the user is eligible for OTP resend (based on app flow or
ENABLE_RESEND_ACTIVATION_CODEflag). - 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
attemptsLeftto guide retry attempts. - Handle all responses and errors gracefully.
Updated 6 months ago
