---
title: "perform a login with STS"
method: POST
path: "/sts/login"
tags: ["experimental"]
---

# perform a login with STS

`POST /sts/login`

## Request body

- StsAuthRequest
  - `code` string, required
  - `state` string, required
  - `redirect_uri` string, required
  - `ttl_seconds` integer — The time-to-live for the generated token in seconds. The default value is 3600 seconds (1 hour) maximum time allowed is 12 hours.

## Response `200`

successful STS login

- AuthenticationToken
  - `token` string, required — a JWT token that could be used to authenticate requests
  - `token_expiration` integer — Unix Epoch in seconds

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `429` — too many requests
- `default` — Internal Server Error

---

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