---
title: "Authorize an OAuth Token"
method: POST
path: "/v1/oauth/authorize"
tags: ["OAuth"]
---

# Authorize an OAuth Token

`POST /v1/oauth/authorize`

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`

Successfully issued a code.

- AuthorizeOAuthTokenResponse
  - `client_id` string, required — OAuth `client_id`
  - `code` string, required — OAuth code to exchange with token
  - `redirect_uri` string, required — Redirect URI of OAuth flow
  - `scope` string, required — Granted scopes

## 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/versions/62e3378bb273/schema)
