# Login

Provide the username and password in a request body to receive a bearer token to authenticate to the API's other endpoints.
For new integrations, use `POST /token/` instead: it exchanges a signed assertion for the same bearer token, so no password is sent.
See [Authentication](/products/partner-api/guides/building/auth).

Endpoint: POST /api/v1/login/
Version: Version: 54e9a006

## Request fields (application/json):

  - `username` (string, required)

  - `password` (string, required)

## Response 200:

  - `200` (unknown)
    Successful Response

## Response 200 fields (application/json):

  - `token` (string, required)

  - `expires` (string, required)

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 422:

  - `422` (unknown)
    Validation Error

## Response 422 fields (application/json):

  - `detail` (array)

  - `detail.loc` (array, required)

  - `detail.msg` (string, required)

  - `detail.type` (string, required)

  - `detail.input` (any)

  - `detail.ctx` (object)

## Response 200 examples:

  - `0` (unknown)

