/.well-known/oauth-protected-resource, registers, and only then calls the Box API.
What the agent does
Two registration methods:- Anonymous — the agent gets a token immediately. It can call
GET /meandGET /limitsonly. Creating boxes returnsclaim_requireduntil a human claims it. - Email (
service_auth) — the agent already knows the user’s email. No token until that person signs in and types the code.
identity_assertion registration bodies.
Trial
Starting a trial is the same Stripe Checkout a human uses from the dashboard. The agent callsPOST /api/box/billing/checkout with the claimed token and shows the returned URL. Card, trial-abuse checks, and “one trial per identity” still apply. Anonymous tokens cannot start a trial.
Endpoints
Hosted onhttps://ascii.dev (also under /api/box/... so they work behind the existing /api proxy):
A 401 from the Box API includes
WWW-Authenticate: Bearer resource_metadata="https://ascii.dev/api/box/.well-known/oauth-protected-resource" so an agent that simply hits the API can find the rest.