---
title: "Login with access key"
method: POST
path: "/login"
tags: ["Authentication"]
---

# Login with access key

`POST /login`

Authenticate user using access key and secret key

## Request body

- object
  - `accessKey` string, required — User's access key
  - `secretKey` string, required — User's secret key
  - `duration` string — Custom token validity duration. Defaults to 24h if not provided. Format: <number><unit> where unit is h (hours), d (days), w (weeks), m (months), y (years). Maximum allowed duration is 1 year. Examples: 1h, 12h, 7d, 2w, 6m, 1y.

## Response `200`

Successful login

- object
  - `accessToken` string — JWT access token
  - `expiresAt` integer — Token expiration time in seconds
  - `tokenType` string — Type of token (e.g., "Bearer")

## Other responses

- `401` — Unauthorized Error

---

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