---
title: "Build an OAuth authorization URL for a labeled authorization"
method: POST
path: "/api/oauth-apps/{id}/authorize-url"
tags: ["Script Connections"]
---

# Build an OAuth authorization URL for a labeled authorization

`POST /api/oauth-apps/{id}/authorize-url`

## Path parameters

- `id` string, required

## Request body

- object
  - `label` string
  - `finalRedirect` string, uri

## Response `200`

OAuth authorization URL + state

- object
  - `authorizeUrl` string, required
  - `state` string, required
  - `label` string, required
  - `redirectUri` string, required

## Other responses

- `403` — Only the lead agent can manage OAuth authorizations
- `404` — OAuth app not found

## Changes

- **2026-08-07** `06cac6a7c5bc` — 3 info
  - added the media type `application/json` for the response with the status `200`
  - added the media type `application/json` for the response with the status `403`
  - added the media type `application/json` for the response with the status `404`

[Change history](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/changes/api/oauth-apps/:id/authorize-url/post.md)

---

[API](https://skmtc.dev/desplega-ai/apis/agent-swarm-api.md) · [All operations](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/desplega-ai/agent-swarm-api/revisions/6b1a7f0876b9/schema)
