Nest Authbeta

POST /auth/verify-forgot-password-otp

Verify Forgot Password OTP and get reset token

Verify Forgot Password OTP and get reset token

POST/auth/verify-forgot-password-otp

Request body

NestAuthVerifyForgotPasswordOtpRequestDto

FieldTypeRequiredDescription
emailstringoptionalUser email address (required if phone not provided)
Example: user@example.com
phonestringoptionalUser phone number (required if email not provided)
Example: +1234567890
codestringrequiredVerification or magic-link code (matches OTP entity `code`)
Example: 123456
tenantIdstringoptionalTenant ID for multi-tenant applications
Example: 123e4567-e89b-12d3-a456-426614174000

Examples

Example
{
  "email": "user@example.com",
  "phone": "+1234567890",
  "code": "123456",
  "tenantId": "123e4567-e89b-12d3-a456-426614174000"
}

Responses

200

VerifyOtpResponseDto

FieldTypeRequiredDescription
messagestringrequiredSuccess message
resetTokenstringoptionalPassword reset token - use this to reset password

Example response

{
  "message": "string",
  "resetToken": "string"
}

Try it

curl -X POST 'https://api.example.com/auth/verify-forgot-password-otp' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -d '{"email":"user@example.com","phone":"+1234567890","code":"123456","tenantId":"123e4567-e89b-12d3-a456-426614174000"}'

On this page