Skip to main content

Validate JWT Token

GET 

/token/validate-token

Verifies the validity of the JWT token without performing any additional operation. Typical Flow:

  1. The client sends a request with a JWT token in the Authorization header
  2. The server verifies the token's signature
  3. Validates that the token has not expired
  4. Checks that the associated user is still active
  5. Returns validity information and user data Usage Examples:
  • Verify if the user session is still active before a critical operation
  • Validate token before showing protected content
  • Monitoring system checks tokens in use
  • Frontend checks token before loading the dashboard Information Returned:
  • valid: Boolean indicating if the token is valid
  • userId: ID of the token's owner user
  • role: User role (admin, user, etc.)
  • expiresAt: Token expiration timestamp Important Notes:
  • Does not renew the token, only validates
  • Expired token returns 401
  • Deactivated user invalidates the token
  • Does not consume API quota
  • Useful for implementing session "keep-alive"

Responses

Valid token