Skip to main content

API login (POST /user/login)

Use this to obtain a JWT for all documented routes that require Connected + API.

POST /user/login

Exchanges an API key for a JWT used on subsequent calls.
Authentication: none (you send the key in the body).

Request body

The router accepts JSON (Content-Type: application/json) or application/x-www-form-urlencoded. Required field:
apiKey
string
required
API key from your Mannco.store account settings.

JSON example

Form example

Success response

Use content.jwt (there is no data wrapper).

JWT claims (decoded payload)

Errors (loginAPI.php)

Examples

cURL
JavaScript
Python
Store the JWT securely. When it expires, call POST /user/login again with your API key.

Using the JWT

For endpoints that require Connected + API, send:
The server may also accept a session cookie in browser contexts; for API clients, Bearer is the intended method.

IP binding

The JWT is tied to the IP address at login. If your client IP changes (VPN, mobile network, proxy), requests may fail authentication. Use a stable egress IP or the same network as when you obtained the token.

Routes without a logged-in user

Some routes only have the api filter (no connected). Public item endpoints may work without a Bearer token. GET /user/store/ does not require a user JWT. For your account data, always send the Bearer token from POST /user/login.

2FA vs API JWT

Server routes marked with 2fa accept a JWT from POST /user/login without sending a 2FA header: requires2FA succeeds when isAPI is true. If you use a web session instead of the API JWT, 2FA rules apply as on the website.