Get the current account
GET
/api/v1/account
const url = 'http://127.0.0.1:8080/api/v1/account';const options = {method: 'GET'};
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://127.0.0.1:8080/api/v1/accountIncludes the libraries this account can reach. Uses the persisted local-mode user when authentication is disabled. Otherwise an authenticated browser session is required, except for the current account and sign-in. Modifying authenticated requests require the current X-CSRF-Token. Credentials and responses must not be cached.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Operation completed.
Media typeapplication/json
object
active_library_id
required
string
auth_enabled
required
boolean
csrf_token
required
string
libraries
required
Array<object> | null
object
id
required
string
name
required
string
role
required
string
key
additional properties
any
passkeys_available
required
boolean
recovery_authenticated
required
boolean
user
required
object
display_name
required
string
id
required
string
instance_admin
required
boolean
key
additional properties
any
key
additional properties
any
Examplegenerated
{ "active_library_id": "example", "auth_enabled": true, "csrf_token": "example", "libraries": [ { "id": "example", "name": "example", "role": "example" } ], "passkeys_available": true, "recovery_authenticated": true, "user": { "display_name": "example", "id": "example", "instance_admin": true }}The credential sent is invalid (invalid-credentials).
Media typeapplication/problem+json
object
code
required
string
detail
required
string
status
required
integer format: int64
title
required
string
type
required
string
key
additional properties
any
Examplegenerated
{ "code": "example", "detail": "example", "status": 1, "title": "example", "type": "example"}default
Section titled “default”Stable account problem code; authentication, authority, validation or lifecycle conflict.
Media typeapplication/problem+json
object
code
required
string
detail
required
string
status
required
integer format: int64
title
required
string
type
required
string
key
additional properties
any
Examplegenerated
{ "code": "example", "detail": "example", "status": 1, "title": "example", "type": "example"}