Webhooks

Resolve strict connector consent context

HMAC-signed oauth-consent hook. It binds the Hydra challenge, WorkOS subject, desktop client, one connector audience, exact scope catalog, and current entitlement to one pending flow.

post/oauth-hooks/pre-consent

Request

  • Base URL: / (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /oauth-hooks/pre-consent
  • Auth: API key in header X-Hook-Signature

Request body

challengestring required

Hydra consent challenge.

hydra_client_idstring required

Hydra client id. Must match the configured Rowboat Desktop broker client.

requested_audiencestring[] required

Exactly one requested connector audience.

requested_scopesstring[] required

Exact non-empty connector scope set requested from the catalog.

versioninteger required

Hook contract version. Only version 1 is accepted.

workos_user_idstring required

WorkOS user id used to resolve bearer tokens into local users.

Example request

{
  "challenge": "challenge_01HABCDEF",
  "hydra_client_id": "rowboat-desktop",
  "requested_audience": [
    "mcp:canvas"
  ],
  "requested_scopes": [
    "canvas:invoices.read"
  ],
  "version": 1,
  "workos_user_id": "user_01HABCDEF"
}

Response

Structured connector consent context.

request_idstring required

Deterministic context request id bound to the challenge.

subjectstring required

WorkOS subject bound to the pending flow.

Example response

{
  "client": {
    "display_name": "Rowboat Desktop",
    "id": "rowboat-desktop"
  },
  "connector": {
    "audience": "mcp:canvas",
    "display_name": "Canvas",
    "id": "canvas"
  },
  "entitlement": {
    "allowed": true,
    "message": "This connector requires the pro plan.",
    "reason": "scope_not_in_plan",
    "required_plan": "pro",
    "upgrade_url": "rowboat://billing"
  },
  "request_id": "ctx_01HABCDEF",
  "scopes": [
    {
      "description": "Read invoice records.",
      "display_name": "Read invoices",
      "name": "canvas:invoices.read",
      "required": true,
      "requires_step_up": false,
      "tier": "low"
    }
  ],
  "subject": "user_01HABCDEF"
}

Changes

No recorded changes to this operation across all 50 revisions of this API.