apistockdocs
v0.4 GitHub apistock.dev
API reference/Auth

Sign in

POST /v1/auth/login
Starts a session (200). Browsers get an HttpOnly __Host-session cookie; native apps pass "transport": "bearer" and get the token in the response. For an account with two-factor authentication the response is 202 with mfa.challenge_token instead: finish with POST /v1/auth/login/mfa.

Body

application/json
emailstringrequired
maxLength: 254
passwordstringrequired
maxLength: 512
transportstring

cookie (browsers): an HttpOnly session cookie; bearer (native apps): the token in the response

one of: cookie, bearerdefault: "cookie"

Responses

errors: application/problem+json
200

OK

401

Unauthorized

403

Forbidden

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

503

Service Unavailable

Match errors on the problem's code, which stays the same, not on its message.

esc
↑↓ move↵ openesc close