---
title: "Generate a new client token (JWT)"
method: POST
path: "/generate_access_token"
---

# Generate a new client token (JWT)

`POST /generate_access_token`

Use your org-level API key (`Bearer fl-xxxxxx`) to create a 
JWT token for a specific client. The token can be used at 
client-facing endpoints.

## Request body

- object
  - `client_id` string, required — Identifier for the client
  - `duration_secs` integer, required — Token lifetime in seconds
  - `metadata` object — Optional metadata to store with the token

## Response `200`

Returns the newly generated token

- object
  - `access_token` string — The JWT token
  - `expires_in` integer — How long the token remains valid (in seconds)

## Other responses

- `401` — Unauthorized (invalid org-level API key)
- `500` — Internal server error

---

[API](https://skmtc.dev/wisprflow/apis/client-side-authentication-api.md) · [All operations](https://skmtc.dev/wisprflow/apis/client-side-authentication-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/wisprflow/client-side-authentication-api/revisions/b310f2be849d/schema)
