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)/buyand/buy/{items}(browser shopping permalinks)/api/ucp/oauth/tokenand/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.
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
* 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
profileURL in theUCP-Agentheader. - MCP: Checked against
UCP-Agentwhen sent, and againstmeta["ucp-agent"].profileon everytools/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) ormeta["ucp-agent"].profile(MCP). - Rate limits and
Idempotency-Keycaches 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 with401identity_requiredon REST (profile_mismatchon MCP, wheremeta["ucp-agent"].profileis 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
SignatureandSignature-Inputare required. Presenting only one fails with401signature_missingand never falls back to anonymous. - Key resolution: The verifier does not extract keys from the signature itself; it fetches the JWK Set (
keys[], matched bykeyid, excludinguse: "enc"keys orkey_opswithout"verify") from the HTTPS profile URL inUCP-Agent. For Web Bot Auth (tag="web-bot-auth", withcreated,expires, covered"signature-agent";key="<label>", andkeyidequal to the RFC 7638 JWK thumbprint), it can alternatively resolve atype=jwks_urientry fromSignature-Agentmatching the signature label. Verifying viaSignature-AgentwhenUCP-Agentis also present is rejected with403profile_mismatch. - Algorithm: ECDSA P-256 / SHA-256 (
ES256/ecdsa-p256-sha256, raw 64-byter||s) only; the algorithm is taken from the JWK. Unsupported algorithms fail with400algorithm_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 returns400digest_mismatch) andcontent-type(when the request has a body), andidempotency-key,ucp-agent, andsignature-agentwhenever those headers are present. - Freshness, replay, and key limits: Up to 4 signatures are tried per request. When
createdis present, it must be within 90 seconds of the current time (10-second clock skew tolerance);expiresmust not be in the past or earlier thancreated. Optionalnoncevalues are replay-checked over a 100-second window (or bounded byexpiresup to 24 hours whencreatedis 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)
- 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-RemainingandX-RateLimit-Reset(Unix timestamp). When a limit is exceeded, the store returns HTTP429(rate_limited) with aRetry-Afterheader in seconds. Rely on these headers rather than hardcoding limits.
Authentication and policy error codes
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.