Get the signed-in user
GET
/api/v1/me
const url = 'http://localhost:8080/api/v1/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 http://localhost:8080/api/v1/me \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The signed-in user.
Media typeapplication/json
object
id
required
integer format: int64
name
required
string
role
required
string
libraryIds
required
Libraries a reader may open. Empty for admins, who see every library.
Array<integer>
createdAt
required
string format: date-time
demo
True on /api/v1/me for a shared demo account, which can’t change its settings. Absent otherwise.
boolean
Example
{ "role": "admin"}The request has no valid session token.
Media typeapplication/json
object
code
required
string
message
required
Explains the problem to a developer.
string
Example
{ "code": "bad_request"}