---
title: "Access Token"
method: POST
path: "/auth/access-token"
tags: ["Authentication"]
---

# Access Token

`POST /auth/access-token`

Exchange credentials for a JWT access token.

Accepts either:
- `client_id` + `secret` (classic API token flow)
- `project_key`: a Streamkap Project Key credential file (raw JSON or base64-encoded)

For `project_key` input, the API credentials are extracted from the bundle and used
to issue the JWT. Kafka-only Project Keys (no API credentials) cannot be exchanged
for a JWT.

## Request body

- BodyGetAccessToken
  - `client_id` string, nullable
  - `secret` string, nullable
  - `project_key` string, nullable

## Response `200`

Successful Response

- AccessToken
  - `expires` string, required
  - `expiresIn` integer, required
  - `accessToken` string, required
  - `refreshToken` string, required

## Other responses

- `422` — Validation Error

---

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