Verify OTP
POST /verify/otp
Verifies a 6-digit one-time passcode (OTP) that was previously sent to a user’s email address.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
POST /verify/otp — Verify a one-time passcode
POST /verify/otp
Verifies a 6-digit one-time passcode (OTP) that was previously sent to a user’s email address.
POST /verify/otp
curl -X POST http://localhost:8080/verify/otp \
-H "X-API-Key: lfy_your_key" \
-H "Content-Type: application/json" \
-d '{
"email":"hello@example.com",
"code":"483920"
}'
| Field | Type | Required | Description |
|---|---|---|---|
email | string | ✅ | Email address the OTP was sent to |
code | string | ✅ | The 6-digit OTP code |
{
"verified": true,
"message": "OTP verified"
}
{
"error": "invalid or expired OTP"
}
| Status | Description |
|---|---|
| 400 | Invalid, expired, or already-used OTP |
| 401 | Invalid or missing API key |
| 422 | SMTP configuration has not been set up |