This is step 2 of the AirGuide login flow. After callingDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/luiss811/Backend-Airguide/llms.txt
Use this file to discover all available pages before exploring further.
POST /api/auth/login and receiving an OTP in your email, submit that code here to complete authentication. On success, you receive a signed JWT token to use on all subsequent requests. If you did not receive the code or it expired, use the resend endpoint described below.
Verify your OTP
Endpoint
Request body
Your registered email address. Use the
correo value returned by POST /api/auth/login.The 6-digit OTP code delivered to your email. Codes are single-use and expire after a short window.
Response
A signed JWT Bearer token. Include this in the
Authorization header of every protected request.The authenticated user record.
Example
Using the token
Include the token in theAuthorization header of every request to a protected endpoint:
401 Unauthorized. Requests to admin-only endpoints with a non-admin token receive 403 Forbidden.
Resend an OTP
If your code expired or you did not receive it, request a fresh OTP without going back through the login step.Endpoint
Request body
Your registered email address.
Response
A confirmation string. Returns
"Nuevo código enviado a tu correo electrónico." on success. Returns "Si el correo existe, recibirás un nuevo código." if the account is not found or not active — this prevents email enumeration.Example
Resending a code invalidates all previous unused OTPs for your account. Only the most recently issued code is valid.
