---
title: "POST /auth/v1/tokens"
method: POST
path: "/auth/v1/tokens"
---

# POST /auth/v1/tokens

`POST /auth/v1/tokens`

Authenticates a user with `Authorization` header and returns a `token`
object.

## Headers

- `authorization` string
- `x-forwarded-for` string
- `x-forwarded-user` string

## Request body

- TokenRequest
  - `ttl` integer, nullable

## Response `201`

New token has been created

## Other responses

- `401` — Invalid or missing credentials has been provided
- `default` — Unexpected error

---

[API](https://skmtc.net/stackstorm/apis/stackstorm-api.md) · [All operations](https://skmtc.net/stackstorm/apis/stackstorm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/stackstorm/stackstorm-api/revisions/85e49f390588/schema)
