---
title: "Generate access token"
method: POST
path: "/api/v1/oauth/token"
tags: ["Organization Token"]
---

# Generate access token

`POST /api/v1/oauth/token`

Request an OAuth2 access token for API authentication. Use the returned token in a subsequent /sessions call.

## Request body

- TokenRequest
  - `client_id` string, required — OAuth2 client ID
  - `client_secret` string, required — OAuth2 client secret
  - `audience` string, required — API audience identifier
  - `grant_type` 'client_credentials', required — OAuth2 grant type
  - `organization_id` string, required — Organization identifier

## Response `200`

Access token generated successfully

- TokenResponse
  - `access_token` string, required — JWT access token
  - `expires_in` integer, required — Token expiration time in seconds
  - `token_type` string, required — Token type

## Other responses

- `400` — Bad Request - Invalid client credentials or parameters
- `401` — Unauthorized - Invalid client credentials

---

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