auth

Login

Logs a user in. Returns a JWT-Token to authenticate further requests.

post/login

Request

  • Base URL
    /api/v1 (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/v1/login
  • Auth
    none declared

Request body

long_tokenboolean

If true, the token returned will be valid a lot longer than default. Useful for "remember me" style logins.

passwordstring

The password for the user.

totp_passcodestring

The totp passcode of a user. Only needs to be provided when enabled.

usernamestring

The username used to log in.

Response

OK

tokenstring

Example response

{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}

Changes

No recorded changes to this operation across all 74 revisions of this API.