Skip to main content

Login

The /auth/login endpoint is used to authenticate a user via a refresh_token. It establishes a session and returns relevant account metadata.

Method

POST /auth/login

Request Body

{
"refresh_token": "string"
}
  • refresh_token — a string token used to identify and authenticate the user.

Response

{
"status": 200,
"data": {
"id": "string",
"copier_accounts": 0,
"leader_accounts": 0,
"is_verified": true,
"access_token": "string"
}
}

Notes

  • access_token is only included in the response if the request origin is localhost. In all other environments, the access token is set via an HTTP-only cookie.
  • The other fields are always returned.

Fields Explained

  • copier_accounts: Number of copier accounts the user currently has active.
  • leader_accounts: Number of leader accounts the user currently has active.
  • is_verified: Whether the user has completed KYC verification.
  • access_token: JWT access token (returned only on localhost for development purposes).
  • id: Our system's User ID not Bitmex's User ID.