Skip to content

Sign in

POST
/api/v1/auth/sign-in
curl --request POST \
--url http://localhost:8080/api/v1/auth/sign-in \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "password": "example", "device": "example" }'
Media typeapplication/json
object
name
required

Not case-sensitive.

string
password
required
string
device

A label for this session, such as “Living room iPad”.

string

Example generated

{
"name": "example",
"password": "example",
"device": "example"
}

Signed in. Sessions last 90 days after their last use.

Media typeapplication/json
object
token
required

Send as Authorization: Bearer <token>.

string
user
required
object
id
required
integer format: int64
name
required
string
role
required
string
Allowed values: admin reader
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

{
"user": {
"role": "admin"
}
}

The request was malformed.

Media typeapplication/json
object
code
required
string
Allowed values: bad_request unauthorized forbidden not_found unavailable scan_in_progress content_changed already_set_up name_taken last_admin progress_conflict too_many_attempts not_linked identity_taken last_sign_in provider_unavailable too_many_sign_ins repository_exists repository_not_allowed repository_unreadable repository_needs_token repository_needs_password repository_needs_credentials repository_credentials_refused extension_invalid source_failed source_unavailable source_check_failed internal
message
required

Explains the problem to a developer.

string

Example

{
"code": "bad_request"
}

The request has no valid session token.

Media typeapplication/json
object
code
required
string
Allowed values: bad_request unauthorized forbidden not_found unavailable scan_in_progress content_changed already_set_up name_taken last_admin progress_conflict too_many_attempts not_linked identity_taken last_sign_in provider_unavailable too_many_sign_ins repository_exists repository_not_allowed repository_unreadable repository_needs_token repository_needs_password repository_needs_credentials repository_credentials_refused extension_invalid source_failed source_unavailable source_check_failed internal
message
required

Explains the problem to a developer.

string

Example

{
"code": "bad_request"
}

Too many wrong passwords from this address in the last 15 minutes. Requests with a session token, or with Basic credentials already accepted, are not affected.

Media typeapplication/json
object
code
required
string
Allowed values: bad_request unauthorized forbidden not_found unavailable scan_in_progress content_changed already_set_up name_taken last_admin progress_conflict too_many_attempts not_linked identity_taken last_sign_in provider_unavailable too_many_sign_ins repository_exists repository_not_allowed repository_unreadable repository_needs_token repository_needs_password repository_needs_credentials repository_credentials_refused extension_invalid source_failed source_unavailable source_check_failed internal
message
required

Explains the problem to a developer.

string

Example

{
"code": "bad_request"
}

The server failed; details are in its log.

Media typeapplication/json
object
code
required
string
Allowed values: bad_request unauthorized forbidden not_found unavailable scan_in_progress content_changed already_set_up name_taken last_admin progress_conflict too_many_attempts not_linked identity_taken last_sign_in provider_unavailable too_many_sign_ins repository_exists repository_not_allowed repository_unreadable repository_needs_token repository_needs_password repository_needs_credentials repository_credentials_refused extension_invalid source_failed source_unavailable source_check_failed internal
message
required

Explains the problem to a developer.

string

Example

{
"code": "bad_request"
}