Unblock User Account
🔄 resetBlockedUserAccount
API
resetBlockedUserAccount
API📘 Overview
The resetBlockedUserAccount()
API is used in self-service account recovery flows to reset a user who has been blocked due to exhausting password attempts. This API provides a secure way for the app to guide users through unblocking themselves without administrative intervention, only if they are blocked due to password-related lockout.
🧭 When to Use
- When the SDK returns status code
141
in response togetUser()
indicating that the user account is BLOCKED due to consecutive wrong password attempts. - Only applicable if the block reason is exhaustion of password attempts.
- Not applicable if the block is due to OTP, secret answers, or any admin-driven reason — in such cases, the REL-ID Admin Console must be used.
🚨 Error Detection
Status Code 141
141
Code | Description | Action |
---|---|---|
141 | User is BLOCKED due to wrong password tries | Show error and offer consent |
📲 UI Flow
- User attempts login with incorrect password multiple times
- After 3 (or configured) failed attempts, account is blocked
- App receives
status: 141
in getUser event - App displays an error screen with explanation and consent prompt
- If user agrees, call
resetBlockedUserAccount()
. If user does not agree to reset account callresetAuthState
- SDK triggers next step (e.g.,
getActivationCode
) to re-authenticate user
flowchart TD getPassword[SDK triggers getPassword] --> setPassword[API calls setPassword] setPassword --> isPasswordCorrect{is Password Correct ?} isPasswordCorrect -- Yes --> nextChallenge[Next Configured Challenge] passwordAttemptsExhausted{password attempts exhausted?} -- No --> getPassword isPasswordCorrect -- No --> passwordAttemptsExhausted passwordAttemptsExhausted -- Yes --> userGetsBlocked[User Gets Blocked] userGetsBlocked --> getUser[SDK triggers getUser with status 141] getUser --> userConsent{Did user provide consent to proceed with reset?} userConsent -- No --> resetAuthState[App calls resetAuthState] userConsent -- Yes --> resetBlockedUserAccount[App calls resetBlockedUserAccount] resetBlockedUserAccount --> challenge[SDK triggers getActivationCode or other configured challenge] style getPassword fill:#d4fdd4,stroke:#228b22,stroke-width:2px style getUser fill:#d4fdd4,stroke:#228b22,stroke-width:2px style challenge fill:#d4fdd4,stroke:#228b22,stroke-width:2px style setPassword fill:#ffe4b3,stroke:#ff8c00,stroke-width:2px style resetAuthState fill:#ffe4b3,stroke:#ff8c00,stroke-width:2px style resetBlockedUserAccount fill:#ffe4b3,stroke:#ff8c00,stroke-width:2px
🟩 Green - Callbacks issued by REL-ID SDK
🟧 Orange - APIs invoked by the Client App
📤 Request Payload
{
"loginId": "[email protected]",
"reason": "Reset due to password attempts exhausted"
}
Field | Type | Description |
---|---|---|
loginId | string | User’s login identifier (email, username, etc.) |
reason | string | Optional explanation for audit/logging |
✅ Sample Code
React Native
RdnaClient.resetBlockedUserAccount({
loginId: "[email protected]",
reason: "Self-service reset after lockout"
});
Flutter
rdna.resetBlockedUserAccount({
"loginId": "[email protected]",
"reason": "Self-service reset after lockout"
});
Cordova
com.uniken.rdnaplugin.RdnaClient.resetBlockedUserAccount({
loginId: "[email protected]",
reason: "Self-service reset after lockout"
});
Native Android
JSONObject payload = new JSONObject();
payload.put("loginId", "[email protected]");
payload.put("reason", "Self-service reset after lockout");
RdnaClient.getInstance().resetBlockedUserAccount(payload);
Native iOS
let payload: [String: Any] = [
"loginId": "[email protected]",
"reason": "Self-service reset after lockout"
]
RdnaClient.shared.resetBlockedUserAccount(payload)
🔁 Next Steps After API Call
If accepted, SDK will emit further challenges (e.g. getActivationCode
) as per policy:
- Biometric
- OTP
- Secret answers
These must be handled in sequence to complete re-authentication.
❗ Restrictions
- Works only when the reason for blocking is wrong password attempts.
- Will not work if the user is blocked due to:
- OTP attempt exhaustion
- Secret answer failures
- Admin-imposed blocks
- In such cases, unblock must be done via REL-ID Admin Console
🧠 Best Practices
- Explain clearly why the user was blocked
- Make consent optional and transparent
- Follow up reset with strong authentication steps
- Log reason for audit tracking
📎 Use this API to enhance user self-recovery and reduce dependency on manual support.
Updated 2 months ago