Skip to main content
Call POST /auth/login to authenticate an existing user and receive a JWT access token and refresh token. You can identify the user by either their email address or their username — provide one or the other along with their password. The returned tokens work identically to those issued by POST /auth/guest.

Endpoint

Request body

Provide either email or username together with password. You do not need to supply both email and username.
string
The user’s email address. Required if username is not provided.
string
The user’s username. Required if email is not provided.
string
required
The user’s password.

Response fields

Status: 200 OK
string
required
JWT access token. Include this in the Authorization: Bearer <token> header on subsequent requests.
integer
required
Number of seconds until the access token expires.
string
required
Token used to obtain a new access token when the current one expires. See POST /auth/refresh.

Example

cURL
Response