Skip to content
Navigation

Approve or deny an MCP authorization request

POST
https://api.nicer.travel/agent/mcp/authorizations/{requestId}

Approves or denies what an AI client asks for, as the signed-in person; the person's normal session token is the only way to approve. The answer is redirectUrl, where the consent page sends the browser next: the client's redirect URI with code, state and iss when approved, or with error=access_denied, state and iss when denied. The code works once, within 60 seconds, and only for this client, redirect URI, PKCE challenge and server; the connection exists once the client trades it at https://mcp.<env>/token, and acts as the person who approved. access is what the person picked on the consent page, READ, WRITE or MONEY, whatever the client's scopes asked; left out, the preselected access (READ or WRITE) is granted, so MONEY is granted only when sent. A request is decided once. An INTERNAL request opens mcp.<env>/internal and may be approved or denied only by Nicer staff with the superadmin platform role, on the same consent page in the portal. A person holds at most 20 connections: Nicer never removes one to make room, not even the oldest unused one, so at the limit the approval fails and the request stays open until the person revokes one or it expires. Errors: 400 ERROR_BODY_VALIDATION for an access with DENY; 404 ERROR_ITEM_NOT_FOUND for a request that does not exist, has expired or was already decided; 403 ERROR_MCP_SESSION_REQUIRED for a token minted from a connection; 403 ERROR_FORBIDDEN for deciding an INTERNAL request as anyone but a platform superadmin; 409 ERROR_MCP_CONNECTION_LIMIT for approving with 20 connections held; 429 ERROR_RATE_LIMIT past 10 decisions an hour.

Authorization

  • bearerAuth
    HTTP Bearer (JWT)
    required

    Authorization: Bearer <token>

Path parameters

  • requestId
    string
    required

Request body JSON required

  • decision
    APPROVE
    or
    DENY
    required

    APPROVE sends the client a one-time code; DENY sends it error=access_denied.

  • access
    optional
    READ
    or
    WRITE
    or
    MONEY

    Only with APPROVE: the access the person picked, READ, WRITE or MONEY, whatever the client's scopes asked. Left out, the access the consent page preselects (READ or WRITE, never MONEY): MONEY is granted only when sent here.

Returns

200

OK

JSON
  • redirectUrl
    string
    required

    The client's redirect URI with the authorization response in its query: code, state and iss when approved (RFC 6749 §4.1.2, RFC 9207), or error=access_denied, state and iss when denied (RFC 6749 §4.1.2.1). The consent page navigates to it.

    format: uri

400

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

401

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

403

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

429

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

Type to search…

↑↓ navigate↵ selectEsc close