Validate JWT Token
GET/token/validate-token
Verifies the validity of the JWT token without performing any additional operation. Typical Flow:
- The client sends a request with a JWT token in the Authorization header
- The server verifies the token's signature
- Validates that the token has not expired
- Checks that the associated user is still active
- 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 validuserId: ID of the token's owner userrole: 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
- 200
- 401
Valid token
Invalid or expired token