---
title: "Discover OAuth endpoints from provider metadata"
method: POST
path: "/api/oauth-apps/discover"
tags: ["Script Connections"]
---

# Discover OAuth endpoints from provider metadata

`POST /api/oauth-apps/discover`

## Request body

- object
  - `url` string, uri, required

## Response `200`

Discovered OAuth metadata

- object
  - `authorizeUrl` string, required
  - `tokenUrl` string, required
  - `scopes` string[], required
  - `sourceUrl` string, required

## Other responses

- `400` — Discovery failed
- `403` — Only the lead agent can manage script connections

---

[API](https://skmtc.net/desplega-ai/apis/agent-swarm-api.md) · [All operations](https://skmtc.net/desplega-ai/apis/agent-swarm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/desplega-ai/agent-swarm-api/versions/db1079e034dc/schema)
