---
title: "Approve or deny an OAuth authorization request"
method: POST
path: "/v1/oauth/consent"
tags: ["oauth"]
---

# Approve or deny an OAuth authorization request

`POST /v1/oauth/consent`

## Request

- Base URL: `https://api.typenode.ai`
- URL: `https://api.typenode.ai/v1/oauth/consent`
- Auth: HTTP bearer

## Request body

- OAuthConsentDecision
  - `acr_values` string
  - `approved` boolean, required
  - `as_issuer` string, uri, required
  - `client_id` string, required
  - `code_challenge` string, required
  - `code_challenge_method` 'S256', required
  - `connection_name` string
  - `environmentIds` string[]
  - `expected_current_grant_id` string, uuid, nullable
  - `expiresAt` integer, nullable
  - `redirect_uri` string, uri, required
  - `resource` string, uri, required
  - `resources` OAuthResourceRestriction[]
    - `resourceId` string, uuid, required
    - `resourceType` string, required
  - `response_type` 'code', required
  - `scope` string, required
  - `state` string

## Response `200`

The AS-computed redirect carrying a one-time authorization code or denial.

- OAuthConsentResult
  - `redirect_url` string, uri, required

## Other responses

- `400`: The authorization tuple, issuer, requested scopes, or restrictions are invalid.
- `401`: Authentication required.
- `403`: The workspace cannot connect Agents, (`NOTHING_TO_GRANT`) the consenting member holds none of the requested capabilities, or (`MCP_SERVER_NOT_IN_WORKSPACE`) a Custom MCP connector's server is not in the member's Workspace.
- `409`: The named connection changed or reached its active-name limit; reload and review it before approving again. (`CONSENT_POLICY_PENDING`) A workspace policy change has reached the authorization servers but has not finished applying; retrying the same request does not help, and if it lasts more than a few minutes Typenode support must finish or cancel the change.
- `502`: The selected OAuth issuer could not process consent.
- `503`: The client metadata host is unavailable. Retry after the dependency recovers.
- `default`: An error occurred (RFC 9457 problem+json).

---

[API](https://skmtc.dev/typenode/apis/typenode-management-api.md) · [All operations](https://skmtc.dev/typenode/apis/typenode-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/typenode/apis/typenode-management-api/revisions/9b943024aa98?raw)
