Users / verify
Verify authentication by cookie, API key, or Bearer token.
API Overview
Path: /api/users/verify — Method: GET
Auth: header — Accepts NextAuth session cookie or headers: x-apikey or Authorization Bearer (JWT or API key)
Header: x-apikey | Authorization (e.g., Bearer <JWT|API_KEY>)
Example: curl -X GET https://www.advancelytics.com/api/users/verify -H 'Authorization: Bearer <JWT_OR_API_KEY>'
Request Details
Headers
- x-apikey(string)— Opaque API key for user identification
- Authorization(string)— Bearer <JWT or API key>
- Cookie(string)— next-auth.session-token=<token>
No path params required
No query required
No body required
Responses
- 200Authenticated
{"success":true,"user":{"id":"...","email":"alice@example.com","name":"Alice"}} - 401Unauthorized or invalid token/API key
- 500Verification error
Notes & Tips
- Ensure headers match exactly (e.g.,
x-apikey). - Use
Content-Type: application/jsonfor JSON bodies. - For Bearer auth, you can provide either a session JWT or an opaque API key where supported.