---
title: "Login"
method: POST
path: "/auth/login"
tags: ["Auth"]
---

# Login

`POST /auth/login`

## Request

- Base URL: `https://app.didattica.polito.it/api`
- URL: `https://app.didattica.polito.it/api/auth/login`
- Auth: none required
- TypeScript: <https://skmtc.dev/polito/apis/polito-faculty-api/docs/auth/login/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- union
  - LoginRequestBase
    - `client` Client
      - `buildNumber` string, required
      - `appVersion` string, required
      - `fcmRegistrationToken` string
      - `name` string, required
      - `id` string
    - `device` Device
      - `name` string
      - `platform` string, required
      - `version` string
      - `model` string
      - `manufacturer` string
      - `toothPicCompatible` boolean, required
    - `preferences` UpdatePreferencesRequest, required
      - `language` 'it' | 'en'
  - LoginRequestBase
    - `client` Client
      - `buildNumber` string, required
      - `appVersion` string, required
      - `fcmRegistrationToken` string
      - `name` string, required
      - `id` string
    - `device` Device
      - `name` string
      - `platform` string, required
      - `version` string
      - `model` string
      - `manufacturer` string
      - `toothPicCompatible` boolean, required
    - `preferences` UpdatePreferencesRequest, required
      - `language` 'it' | 'en'

## Response `200`

The request has succeeded.

- object
  - `data` Identity, required
    - `username` string, required
    - `type` string, required
    - `clientId` string, required
    - `token` string, required

## Other responses

- `400`: The server could not understand the request due to invalid syntax.
- `500`: Server error

---

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