---
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

## Other responses

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

---

[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.dev/desplega-ai/apis/agent-swarm-api/revisions/4f62e32be8ec?raw)
