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

# Generate access token

`POST /api/v1/oauth/token`

## Request

- Base URL: `https://api.sandbox.connect.xyz`
- URL: `https://api.sandbox.connect.xyz/api/v1/oauth/token`
- Auth: none declared

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.dev/zerohash/apis/connect.md) - [All operations](https://skmtc.dev/zerohash/apis/connect/llms.txt) - [OpenAPI document](https://skmtc.dev/zerohash/apis/connect/revisions/7ecc7f3a26b5?raw)
