---
title: "Issue an OAuth token"
method: POST
path: "/v1/oauth/token"
tags: ["OAuth"]
---

# Issue an OAuth token

`POST /v1/oauth/token`

The operation issues an OAuth code which can be used in the OAuth code flow.

## Request body

- OAuthTokenRequest — This model is used for both the Issue and Authorize OAuth token routes
  - `account_id` string, uuid, required — end-user account ID
  - `client_id` string, required — OAuth client ID
  - `client_secret` string, required — OAuth client secret
  - `redirect_uri` string, required — redirect URI for the OAuth flow
  - `scope` string, required — scopes requested by the OAuth flow

## Response `200`

Success.

- IssueOAuthTokenResponse
  - `access_token` string, required — OAuth token
  - `scope` string, required — Token's scope
  - `token_type` 'Bearer', required — Always `Bearer`

## Other responses

- `401` — Client does not exist, you do not have access to the client, or "client_secret" is incorrect.
- `422` — Redirect URI or scope is invalid.

---

[API](https://skmtc.net/alpacahq/apis/gift-city-extensions-api.md) · [All operations](https://skmtc.net/alpacahq/apis/gift-city-extensions-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/alpacahq/gift-city-extensions-api/revisions/62e3378bb273/schema)
