---
title: "Approve an app and get the redirect with the authorization code"
method: POST
path: "/api/v1/oauth/authorizations"
tags: ["Connected apps"]
---

# Approve an app and get the redirect with the authorization code

`POST /api/v1/oauth/authorizations`

## Request

- Base URL: `https://otprun.com`
- URL: `https://otprun.com/api/v1/oauth/authorizations`
- Auth: HTTP bearer

## Request body

- AuthorizeInputBody
  - `chat_access` 'all' | 'own': all (default): the app reads every chat; own: only chats it wrote to
  - `client_id` string, required
  - `code_challenge` string, required
  - `code_challenge_method` string, required
  - `project_id` integer, required
  - `redirect_uri` string, required
  - `resource` string
  - `scope` string
  - `state` string

## Response `200`

OK

- AuthorizeOutputBody
  - `redirect_to` string, required

## Other responses

- `403`: Forbidden
- `404`: Not Found
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/otprun/apis/otp-run-api.md) · [All operations](https://skmtc.dev/otprun/apis/otp-run-api/llms.txt) · [OpenAPI document](https://skmtc.dev/otprun/apis/otp-run-api/revisions/43d40d5f4050?raw)
