---
title: "Login"
method: POST
path: "/v2/users/login"
tags: ["session-management"]
---

# Login

`POST /v2/users/login`

## Request

- Base URL: `https://api.exchange.bullish.com/trading-api`
- URL: `https://api.exchange.bullish.com/trading-api/v2/users/login`
- Auth: none required
- TypeScript: <https://skmtc.dev/bullish/apis/bullish-trading-api/docs/v2/users/login/post.ts> (a function with typed inputs; its response is checked against the schema)

Login and generate a new session associated with a JWT. Once you log in from an IP, the same IP must be used for 
the duration of the session for any subsequent requests.

**Ratelimited:** `True`

## Request body

- LoginRequest
  - `publicKey` string
  - `signature` string
  - `loginPayload` LoginPayload
    - `userId` string, required: Bullish user ID
    - `nonce` integer, required: number of seconds since EPOCH as integer
    - `expirationTime` integer, required: number of seconds since EPOCH as integer
    - `biometricsUsed` boolean, required: biometrics flag. always `false`
    - `sessionKey` string, nullable, required: session key. always `null`

## Response `200`

returns JWT and the `authorizer` for signing requests

- LoginResponse
  - `authorizer` string, string, required: JWT authorizer you obtain along with the [JWT token](/rest/authentication#generate-a-jwt-token)
  - `token` string, string, required: JWT token

## Other responses

- `400`: Bad Request
- `401`: Not Authenticated
- `403`: Access Forbidden
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/bullish/apis/bullish-trading-api.md) - [All operations](https://skmtc.dev/bullish/apis/bullish-trading-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bullish/apis/bullish-trading-api/revisions/df5d69ccedcf?raw)
