---
title: "Generate token"
method: POST
path: "/token"
---

# Generate token

`POST /token`

## Query parameters

- `grant_type` string, required

## Request body

- object
  - `sub` integer — The optional ID of the user to act on-behalf-of. This will set the `sub` claim of the returned jwt. If not set this will default the user to an auto-generated service account user attached to the credentials

## Response `200`

200

- object
  - `token_type` string
  - `access_token` string
  - `expires_in` integer

---

[API](https://skmtc.net/greenhouse/apis/auth-api.md) · [All operations](https://skmtc.net/greenhouse/apis/auth-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/greenhouse/auth-api/versions/9517a2e54640/schema)
