OTP Management¶
Resend OTP for account activation (inactive accounts) via POST /api/users/send-otp/. For login code emails (active users), see Request login OTP (POST /api/users/request-login-otp/).
ZeptoMail template keys (see .env.example):
- Register (
POST /api/users/register/) uses the same key as activation resend:ZEPTOMAIL_OTP_TEMPLATE_KEY(purpose=activationin the API). - Login OTP uses
ZEPTOMAIL_OTP_LOGIN_TEMPLATE_KEYwhen set; otherwise it falls back toZEPTOMAIL_OTP_TEMPLATE_KEYso a single template still works until you add a second key in.env.
Response¶
Error Cases¶
- User Not Found: No user exists with the provided email
- Already Active: The account is already activated (no need for OTP)
- Email Required: The email field is missing
Notes¶
- Use this endpoint if you didn't receive the OTP or if it expired
- A new OTP will be generated and sent to the email address
- The previous OTP (if any) will be invalidated
- The new OTP is valid for 5 minutes
- Maximum of 3 attempts per OTP before it's locked