Skip to main content
POST
/
auth
/
verify
Verify Token
curl --request POST \
  --url https://api.example.com/auth/verify \
  --header 'Authorization: <authorization>'
{
  "message": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/4rt21/backend-proyecto/llms.txt

Use this file to discover all available pages before exploring further.

Verifies the validity of an access token and checks user authentication status.

Headers

Authorization
string
required
Bearer token for authentication. Format: Bearer {accessToken}Example: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Response

message
string
Confirmation message indicating token validity.

Example Request

curl -X POST https://api.falconalert.com/auth/verify \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxIiwidHlwZSI6ImFjY2VzcyIsInByb2ZpbGUiOnsiaWQiOiIxIiwiZW1haWwiOiJhcnR1cm9AZ21haWwuY29tIiwibmFtZSI6IkFydHVybyBVdHJpbGxhYSDDiURJVCIsInJvbGVfaWQiOjF9LCJpYXQiOjE3NjEyOTI0MTEsImV4cCI6MTc2MTI5NjAxMX0.ECBWVGu-tXr7Shs9qvg9LMISOXtFQmp3R8C5Uk8cUuw"

Example Response

{
  "message": "Token is valid"
}

Status Codes

CodeDescription
200Token is valid and user is properly authenticated.
401Invalid token, expired token, or authentication issues (missing user profile, missing role).

Validation Checks

This endpoint performs the following validation checks:
  1. Token Validity: Verifies the JWT signature and expiration
  2. User Authentication: Confirms the user exists in the request context
  3. Profile Existence: Ensures the user profile is present
  4. Role Assignment: Validates that a role is assigned to the user

Use Cases

  • Verify token validity before making API requests
  • Check authentication status on application startup
  • Validate tokens in middleware or authentication flows