Send OTP
POST /send/otp
Generates a cryptographically secure 6-digit one-time passcode (OTP) and sends it to the specified email address.
Endpoint
Request
Example request:Request Body
Successful Response
HTTP 200 OKOTP Behavior
LifyGo OTPs follow these security rules:- OTPs are 6-digit numeric codes.
- Generated using Go’s
crypto/randpackage. - Stored in Redis with a 10-minute TTL.
- Only one active OTP per email is allowed at any time.
- Sending a new OTP automatically invalidates the previous one.
- OTPs are single-use and are deleted immediately after successful verification.
Expiration
- OTPs expire after 10 minutes.
- Expired OTPs cannot be verified.
- Once an OTP has been successfully verified, it is permanently removed from storage.