---
title: "Approve a connection (the consent page, with the wallet key)"
method: POST
path: "/oauth/authorize"
tags: ["Connect"]
---

# Approve a connection (the consent page, with the wallet key)

`POST /oauth/authorize`

## Request

- Base URL: `https://api.phoenixlabs.space`
- URL: `https://api.phoenixlabs.space/oauth/authorize`
- Auth: HTTP bearer

Called by https://phoenixlabs.space/connect (the authorization endpoint) when the owner clicks Allow. Wallet key only. Returns where to send the browser, with the code.

## Response `200`

redirect: the client's redirect_uri with code, state and iss.

- object

## Other responses

- `400`: Bad input. `detail` says what to fix.
- `401`: Missing or unrecognised key.
- `402`: The balance, or the agent key's limit, doesn't cover the price. `needs_topup` or `over_limit` says which.

---

[API](https://skmtc.dev/phoenixlabs/apis/phoenix-labs-api.md) · [All operations](https://skmtc.dev/phoenixlabs/apis/phoenix-labs-api/llms.txt) · [OpenAPI document](https://skmtc.dev/phoenixlabs/apis/phoenix-labs-api/revisions/7648b94d8dd2?raw)
