Users who cannot log in can reset their password through a three-step OTP verification flow. An email containing a 6-digit code is sent to the registered address. The code must be verified before a new password is accepted. OTPs expire after 10 minutes and are invalidated once used.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Kr-Yogsa/ECE-BOT/llms.txt
Use this file to discover all available pages before exploring further.
Step 1 — Request a password reset OTP
Send the registered email address to receive a reset code by email. POST /auth/forgot-password/request-otpRequest body
The email address associated with the account to reset.
Responses
Confirmation that the OTP was dispatched.Example:
"OTP sent to your email."Error responses
| Status | Error message | Cause |
|---|---|---|
| 400 | "Email is required." | Missing email field. |
| 400 | "Please enter a valid email address." | Malformed email format. |
| 404 | "User not found." | No account exists for this email. |
| 429 | "OTP already sent. Please wait 1 minute before requesting again." | A reset OTP was requested within the last 60 seconds. |
Example
Step 2 — Verify the OTP
Confirm the user has access to the registered email before accepting a new password. POST /auth/forgot-password/verify-otpRequest body
The email address the OTP was sent to.
The 6-digit one-time code from the reset email.
Responses
Confirmation that the code is valid and a new password may be set.Example:
"OTP verified. You can set a new password now."Error responses
| Status | Error message | Cause |
|---|---|---|
| 400 | "Email and OTP are required." | One or both fields are missing. |
| 400 | "Please enter a valid email address." | Malformed email format. |
| 400 | "Invalid OTP." | The code does not match the stored hash. |
| 400 | "OTP has expired." | The 10-minute validity window has passed. |
This step does not consume the OTP. Submit the same code again in Step 3 when setting the new password.
Example
Step 3 — Set a new password
Submit the verified OTP alongside the new password to update the account. POST /auth/forgot-password/resetRequest body
The email address of the account being reset.
The 6-digit OTP from the reset email (same code used in Step 2).
The replacement password to set on the account.
Responses
Confirmation that the password was updated.Example:
"Password updated successfully. Please login."Error responses
| Status | Error message | Cause |
|---|---|---|
| 400 | "Email, OTP, and new password are required." | One or more fields are missing. |
| 400 | "Please enter a valid email address." | Malformed email format. |
| 400 | "Invalid OTP." | The code does not match or has already been used. |
| 400 | "OTP has expired." | The 10-minute window has passed. |
| 404 | "User not found." | No account exists for this email. |
Example
Full password reset flow
Request OTP
Call
POST /auth/forgot-password/request-otp with the account’s email address. A 6-digit code is sent by email and is valid for 10 minutes.Verify OTP
Call
POST /auth/forgot-password/verify-otp with the email and received code. A success response confirms the code is correct and you may show the new password field.After a successful reset, the OTP is marked as used and cannot be reused. The user must request a new code if they need to reset their password again.