---
title: "Create authorization token from username and password"
method: POST
path: "/auth/login/"
tags: ["auth"]
---

# Create authorization token from username and password

`POST /auth/login/`

Use this method to obtain an authorization token that you can use in all other methods.

To use method you should provide basic authorization credentials:

 - `Username` - username of your FF.Multi account
 - `Password` - password for your FF.Multi account

This method returns a structure containing an authorization `token`.

Copy its value, prepend it with "Token" and paste the entire thing into the **API Key** field
in the authorization form of this documentation viewer.

If the system uses face AND password authorization - 
together with the Basic authorization header, 
additionally pass the token received during face authorization in the `video_auth_token` field.

## Request body

- LoginRequestRequest
  - `video_auth_token` string — Inactive token from face authorization. Required when `face_and_password` is set
  - `uuid` string, required — Device unique identifier
  - `mobile` boolean — Device is mobile
  - `device_info` object — Device information

## Response `200`

- LoginResult
  - `token` string, required — Authorization token
  - `user` User, required
    - `id` integer, required
    - `active` boolean, required
    - `created_date` string, date-time, required
    - `groups` integer[]
    - `modified_date` string, date-time, required — Object modification date
    - `permissions` string[], required
    - `real_name` string, required
    - `name` string, required
    - `comment` string — Extended description of the user, up to 2048 chars
    - `camera_group_permissions` object, required
    - `watch_list_permissions` object, required
    - `group_permissions` object, required
    - `primary_group` integer, required
    - `language` 'en-us' | 'es' | 'ru'
    - `has_face` boolean, required — User photo is provided
    - `face_cover` string, nullable
    - `ad_user` boolean, required — User is registered in Active Directory
  - `token_expiration_datetime` string, date-time, required — Token expiration datetime

## Other responses

- `401`

---

[API](https://skmtc.dev/ntechlab/apis/internal-api-documentation.md) · [All operations](https://skmtc.dev/ntechlab/apis/internal-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ntechlab/internal-api-documentation/revisions/fe217a895bc7/schema)
