Get current user
GET
/auth/me
const url = 'https://auth.timetonic.com/api/auth/me';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://auth.timetonic.com/api/auth/me \ --header 'Authorization: Bearer <token>'Get authenticated user information. Accepts a Bearer token OR a portal session cookie (OidcBearerOrSession middleware).
Authorizations
Section intitulée « Authorizations »Responses
Section intitulée « Responses »User information
Media typeapplication/json
object
success
boolean
user
object
id
string format: uuid
email
string format: email
name
string
2fa_enabled
boolean
Examplegenerated
{ "success": true, "user": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "email": "hello@example.com", "name": "example", "2fa_enabled": true }}Authentication required or failed
Media typeapplication/json
object
success
boolean
error
string
message
string
Example
{ "success": false, "error": "unauthorized", "message": "Authentication required"}