Skip to Content
ReferenceUCP API ReferenceAuthentication

Authentication

UCP REST endpoints under /api/ucp/* and the Storefront MCP server (/mcp) share the same authentication tiers, credential rules, and rate-limiting policy.

Public and exempt endpoints that do not use agent authentication:

  • /.well-known/ucp, /.well-known/oauth-authorization-server, and /.well-known/oauth-protected-resource (public discovery)
  • /buy and /buy/{items} (browser shopping permalinks)
  • /api/ucp/oauth/token and /api/ucp/oauth/revoke (OAuth public-client endpoints authenticated via PKCE or token ownership)

Authentication tiers

Finqu supports four authentication tiers. The merchant controls whether anonymous and signed access are allowed in channel settings.

TierHow to authenticateTypical use
TokenX-API-Key: fq_secret_... (channel key) or X-API-Key: fq_platform_... (platform or broker key)Production agents and platforms with full access
UserAn agent credential (X-API-Key or RFC 9421 signature) plus Authorization: Bearer ucp_at_...Buyer-linked order reads and customer-attached checkouts
SignedHTTP Message Signatures (RFC 9421 ) via Signature and Signature-InputVerified agent identity without sharing a long-lived secret
AnonymousNo credentials (only when enabled by the merchant)Public catalog, location, and cart access

A presented credential that fails (invalid or expired key, bad or partial signature, or an invalid, expired, revoked, or mismatched ucp_at_... token) is always rejected and never falls back to anonymous or to the paired agent credential alone.

Tier access matrix

Resource bucketAnonymousSignedUserToken
CatalogYesYesYesYes
CartYesYesYesYes
LocationYesYesYesYes
CheckoutNoYesYesYes
OrderNoYesYes*Yes

* On User-tier requests, order reads (GET /api/ucp/orders/{id} and MCP get_order) require the dev.ucp.shopping.order:read OAuth scope (a missing scope returns 403 insufficient_scope) and are restricted to orders owned by the linked customer.

On Storefront MCP (/mcp), ucp_describe is available to all tiers (anonymous+), tools/list returns only the tools reachable by the caller’s tier, and tools/call re-checks the tier at execution time. When agent authentication is used on the Storefront GraphQL endpoint (graphql bucket), queries are allowed from anonymous+ and mutations require signed+.

API keys

Send API keys in the X-API-Key header on both UCP REST and Storefront MCP:

X-API-Key: fq_secret_...

Authorization: Bearer fq_... is still accepted for legacy clients, but Authorization can only hold one Bearer token. Use X-API-Key whenever you also send a buyer Authorization: Bearer ucp_at_... token.

Channel API keys (fq_secret_...)

Merchants create channel API keys in the admin area (see Activating UCP). Each secret key is scoped to one channel and grants the token tier.

Creating a channel key also generates a public key (fq_pub_...) for client-side Storefront GraphQL usage. Public keys (fq_pub_...) are rejected on UCP REST and Storefront MCP with HTTP 401.

Platform API keys (fq_platform_...)

Finqu issues platform keys to vetted agentic platforms. Platform keys grant token-tier access across every channel that has UCP enabled (REST) or the MCP server enabled (MCP), with higher rate limits than standard channel keys.

Profile binding

Standard platform keys and verified signed requests are bound by origin (scheme://host[:port]) to their registered or verifying profile URL. The path may differ so platforms can publish versioned profile paths:

  • REST: Checked against the profile URL in the UCP-Agent header.
  • MCP: Checked against UCP-Agent when sent, and against meta["ucp-agent"].profile on every tools/call.

Claiming a profile on another origin is rejected with HTTP 403 and error code profile_mismatch (on MCP, a tool error with code: "profile_mismatch"). Channel keys (fq_secret_...) are not bound to a specific platform profile origin.

Broker platform keys

Finqu can provision a platform intermediary that proxies requests for multiple downstream agents in broker mode:

  • At Token tier, broker keys may forward any valid public HTTPS downstream agent profile in UCP-Agent (REST) or meta["ucp-agent"].profile (MCP).
  • Rate limits and Idempotency-Key caches are isolated per downstream profile origin, falling back to the broker’s shared bucket when no profile is present or when an MCP batch mixes multiple origins.
  • At User tier (X-API-Key + Authorization: Bearer ucp_at_...), the buyer token remains strictly bound to the downstream profile origin it was issued to. A mismatch fails with 401 identity_required on REST (profile_mismatch on MCP, where meta["ucp-agent"].profile is required).

Buyer identity tokens (ucp_at_...)

To act on behalf of a linked store customer, send the buyer’s OAuth access token in Authorization: Bearer together with the agent’s own credential (X-API-Key or RFC 9421 signature headers):

X-API-Key: fq_secret_... Authorization: Bearer ucp_at_... UCP-Agent: profile="https://your-platform.example/.well-known/ucp"

Sending Authorization: Bearer ucp_at_... without an agent credential is always refused with HTTP 401 (unauthenticated), even when anonymous access is enabled. When the agent authenticates with a platform key, broker key, or HTTP signature, the token must have been issued to the same profile origin (401 identity_required otherwise). See Identity linking for the full OAuth flow.

Signed requests (RFC 9421)

When signed access is enabled for the channel, agents can authenticate with HTTP Message Signatures (RFC 9421 ) and Content-Digest (RFC 9530 ):

  • Headers: Both Signature and Signature-Input are required. Presenting only one fails with 401 signature_missing and never falls back to anonymous.
  • Key resolution: The verifier does not extract keys from the signature itself; it fetches the JWK Set (keys[], matched by keyid, excluding use: "enc" keys or key_ops without "verify") from the HTTPS profile URL in UCP-Agent. For Web Bot Auth (tag="web-bot-auth", with created, expires, covered "signature-agent";key="<label>", and keyid equal to the RFC 7638 JWK thumbprint), it can alternatively resolve a type=jwks_uri entry from Signature-Agent matching the signature label. Verifying via Signature-Agent when UCP-Agent is also present is rejected with 403 profile_mismatch.
  • Algorithm: ECDSA P-256 / SHA-256 (ES256 / ecdsa-p256-sha256, raw 64-byte r||s) only; the algorithm is taken from the JWK. Unsupported algorithms fail with 400 algorithm_unsupported.
  • Required covered components: @method, @authority, @path, plus @query (when a query string is present), content-digest (sha-256=:...:, verified over the raw request body; a mismatch returns 400 digest_mismatch) and content-type (when the request has a body), and idempotency-key, ucp-agent, and signature-agent whenever those headers are present.
  • Freshness, replay, and key limits: Up to 4 signatures are tried per request. When created is present, it must be within 90 seconds of the current time (10-second clock skew tolerance); expires must not be in the past or earlier than created. Optional nonce values are replay-checked over a 100-second window (or bounded by expires up to 24 hours when created is omitted). Remote JWK Sets are cached for up to 300 seconds and may be at most 128 KiB with up to 32 keys.

Capability negotiation header (UCP-Agent)

UCP-Agent is required on all /api/ucp/* REST capability endpoints (exempt: GET /api/ucp, OPTIONS, and /api/ucp/oauth/*). Omitting it returns HTTP 400 with bare protocol error code invalid_profile_url.

UCP-Agent: profile="https://your-platform.example/.well-known/ucp"

This header uses RFC 8941  dictionary syntax. On Storefront MCP (/mcp), pass the profile per tool call in arguments.meta["ucp-agent"].profile. See the Integration guide for negotiation rules.

Rate limits

Requests are rate-limited per store, authentication tier, resource bucket (catalog, cart, location, checkout, order, graphql, mcp), and caller using a 60-second sliding window. Individual merchants can also configure custom limits per store.

Standard default limits (requests per 60 seconds)

BucketAnonymousSignedToken (channel key)
catalog30100200
cart2060100
location3060100
checkout03050
order03050
graphql30100200
mcp60150300
  • Platform and broker keys (fq_platform_...): Receive higher rate limits than channel keys. In broker mode, limits are tracked separately per downstream agent origin so traffic from one agent does not throttle others.
  • User-tier requests (ucp_at_...): Share the rate-limit allowance of the paired agent credential; linking a buyer token never creates a separate quota.
  • Response headers: Responses include X-RateLimit-Remaining and X-RateLimit-Reset (Unix timestamp). When a limit is exceeded, the store returns HTTP 429 (rate_limited) with a Retry-After header in seconds. Rely on these headers rather than hardcoding limits.

Authentication and policy error codes

HTTP statusError codeMeaning
400invalid_profile_urlMissing UCP-Agent header or non-public/non-HTTPS profile URL (bare protocol error {code, content, continue_url})
400digest_mismatchContent-Digest does not match raw request body
400algorithm_unsupportedSigning JWK or alg is not ECDSA P-256 (ES256)
401unauthenticatedMissing credentials (anonymous disabled), signed disabled, invalid/expired/public API key, or bare ucp_at_... token without agent credential
401identity_requiredBuyer ucp_at_... token is invalid, expired, revoked, or issued to another platform origin (WWW-Authenticate carries error="invalid_token" and resource_metadata)
401signature_missingMissing Signature or Signature-Input header
401signature_invalidMalformed signature headers, missing required covered components, expired/stale timestamp, failed verification, or replayed nonce
401key_not_foundkeyid not found in the signer’s published JWK Set
403tier_deniedCaller’s tier cannot access the requested REST resource bucket
403profile_mismatchClaimed profile origin conflicts with the platform key’s registered profile or the Signature-Agent signer
403insufficient_scopeBuyer token is missing a required OAuth scope such as dev.ucp.shopping.order:read
424profile_unreachableSigner’s profile or key set could not be fetched
429rate_limitedRate limit exceeded (Retry-After header included)
503service_unavailableService temporarily unavailable (Retry-After header included; safe to retry)

On Storefront MCP tools/call, call-time policy failures return an MCP tool error envelope with codes insufficient_tier, profile_mismatch, or tool_not_found (and insufficient_scope on get_order when a buyer token lacks dev.ucp.shopping.order:read). See Responses and errors and MCP transport for full error shapes.