---
title: "Create API token for ldap user"
method: POST
path: "/apiTokens/login"
tags: ["API tokens"]
---

# Create API token for ldap user

`POST /apiTokens/login`

## Request

- Base URL: `https://localhost:8446/api/v2`
- URL: `https://localhost:8446/api/v2/apiTokens/login`
- Auth: API key in header `Authorization`

Create new API token for ldap user.

## Request body

- object
  - `login` string, required: User login
  - `password` string, required: User password

## Response `200`

Successful response

- object
  - `id` number, required: API token id
  - `description` string, required: API token description
  - `user_id` number, required: API token is used by user id
  - `token` string, required: API token
  - `expire_at` number, required: API token expiration time (in seconds)

## Other responses

- `default`: Error response. Depending on the error, either a 4xx or 5xx response status is returned.

---

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