Get current user
GET
/api/auth/me
const url = 'http://localhost:3000/api/auth/me';const options = {method: 'GET', headers: {cookie: 'session=<session>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:3000/api/auth/me \ --cookie session=<session>Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”Current authenticated user
Media type application/json
object
data
object
id
required
string format: uuid
userId
required
string format: uuid
email
required
string format: email
firstName
string
lastName
string
role
required
string
Example generated
{ "data": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "userId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "email": "hello@example.com", "firstName": "example", "lastName": "example", "role": "example" }}Not authenticated
Media type application/json
object
error
required
string
Example
{ "error": "Not found"}