Documentation Index
Fetch the complete documentation index at: https://docs.ub.bitbros.in/llms.txt
Use this file to discover all available pages before exploring further.
POST /api/userAuth/login
Validates the user’s credentials and returns a short-lived JWT access token. A refresh token is also issued to keep the session alive without requiring the user to log in again.
Required Header
x-api-key: your pk_live_… key.
Request Body
The user’s registered email address.
The user’s password.
Response Fields
Short-lived JWT. Include this in the
Authorization: Bearer header for authenticated requests.Human-readable duration until the access token expires (e.g.,
"15m").The response also includes a
token field as a backward-compatibility alias of accessToken.
The token alias will be removed in a future release — migrate your clients to accessToken now.Refresh Token Delivery
The refresh token is issued alongside the access token and delivered differently depending on the client type:- Web (browser): issued as an HTTP-only cookie. Your browser stores and sends it automatically — you do not need to handle it manually.
- Mobile / non-browser: returned in the
x-refresh-tokenresponse header. Store it securely and include it when calling/api/userAuth/refresh-token.
Code Examples
Success Response
Errors
| Status | Cause |
|---|---|
400 Bad Request | Missing email or password |
401 Unauthorized | Invalid credentials |
