Authentication
Confirm password reset with OTP (project-based)
Set new password using the OTP sent to the user's email. Call after POST /api/auth/local/password-reset with projectId. Rate limited (OTP limit). If the user's email was not yet verified, it is marked as verified upon successful reset.
POST
/api/auth/local/password-reset/confirmSDK setup
Create a client instance. No authentication is required for this endpoint.
import { Configuration, AuthenticationApi } from 'mudbase-sdk';
const configuration = new Configuration({
basePath: 'https://cloud.mudbase.dev',
});
const authentication = new AuthenticationApi(configuration);import { Configuration, AuthenticationApi } from 'mudbase-sdk';
const configuration = new Configuration({
basePath: 'https://cloud.mudbase.dev',
});
const authentication = new AuthenticationApi(configuration);Example request
Call this endpoint using the client from SDK setup. Use View HTTP for a raw cURL example.
const { data: result } = await authentication.confirmLocalPasswordResetWithOtp(
{
email: "oswald_huel55@northwind.dev",
projectId: "proj_8UM9pdQaTnt4",
otp: "bandwidth generate",
newPassword: "Str0ng_Sample_Pass!w0rd"
}
);const { data: result } = await authentication.confirmLocalPasswordResetWithOtp(
{
email: "oswald_huel55@northwind.dev",
projectId: "proj_8UM9pdQaTnt4",
otp: "bandwidth generate",
newPassword: "Str0ng_Sample_Pass!w0rd"
}
);Playground
liveTest this endpoint with your own credentials. Your requests will be sent to the live API.
No Request Yet
Send a request to see the full inspector
Authentication
Public — No Auth Required
Request Body
json
{
"email": "user@example.com",
"projectId": "685ad30be129932fbb7a1047",
"otp": "123456",
"newPassword": "NewSecurePass123!"
}{
"email": "user@example.com",
"projectId": "685ad30be129932fbb7a1047",
"otp": "123456",
"newPassword": "NewSecurePass123!"
}Responses
200Password reset successful
json
{
"message": "Password reset successful"
}{
"message": "Password reset successful"
}400Invalid or expired OTP, or validation error
404—
429Too many attempts (rate limit)
500—
Errors
| Code | Meaning |
|---|---|
400 | Invalid or expired OTP, or validation error |
404 | — |
429 | Too many attempts (rate limit) |
500 | — |