Check authentication
Auth
Check authentication
Verify a JWT token and retrieve the authenticated user’s profile.
GET
Check authentication
Verifies the provided JWT token and returns the authenticated user’s profile from the database. Use this endpoint to confirm a token is still valid and to retrieve up-to-date user data.
This endpoint requires authentication. Include your token in the
x-access'courser-auth-token header.Request headers
A valid JWT token obtained from any auth endpoint. Note the apostrophe in the header name.
Response
200 — Authenticated
The authenticated user’s full profile document.
401 — Unauthorized
Returned as a JSON string (not an object) in one of the following cases:| Response body | Cause |
|---|---|
"not-logged-in" | The x-access'courser-auth-token header is absent |
"no user found" | Token is valid but no matching user exists in the database |
"ERROR" | Token verification failed (invalid signature or expired) |
Example
200
401