---
title: "Login"
method: POST
path: "/auths"
---

# Login

`POST /auths`

Use `/auths` endpoint to log in the user. Customer authorization is based on <<glossary:JWT>>, which contains `customerId`, `publisherId` and `expiration date`.

There are two ways of login, by `offerId` (if a customer has already chosen an offer) or by `publisherId` (in case a customer will choose an offer after authorization).

## Request body

- object
  - `email` string, required — The email address of the customer (valid RFC2822 email address).
  - `password` string, required — The password of the customer. String containing at least one letter and one digit or special character (!@#$%^&), length - 8-80 characters.
  - `offerId` string, required — ID of Cleeng offer, e.g. S565568989_US. **Required conditionally**, when `publisherId` is not given.
  - `publisherId` string, required — ID of publisher (broadcaster). It consists of 9 digits. **Required conditionally**, when `offerId` is not given.
  - `customerIP` string — Customer IP address. This field is used for geo restrictions (stored as last user IP).

## Response `200`

200

- object
  - `responseData` object
    - `jwt` string
    - `refreshToken` string
    - `customerToken` string
    - `customerId` integer
  - `errors` unknown[]
    - unknown

## Other responses

- `400` — 400
- `401` — 401
- `500` — 500

---

[API](https://skmtc.net/cleeng/apis/mediastore-api.md) · [All operations](https://skmtc.net/cleeng/apis/mediastore-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cleeng/mediastore-api/versions/00cbfe7998a4/schema)
