# Auth.md: Editable QR Code

## User account

Ask the user to [sign up](https://www.editableqrcode.com/signup) or [sign in](https://www.editableqrcode.com/login) in their browser.
An account is required to save or download a QR code. Signup starts a seven-day Business trial without a payment card.
Users can create and download during the trial before email verification, but must verify their email within seven days to retain access.
The user must complete verification, accept terms, and approve any subscription themselves.

## REST API

Base URL: https://www.editableqrcode.com/api/v1
Supabase OAuth is enabled for registered clients. Discover the issuer at https://www.editableqrcode.com/.well-known/oauth-protected-resource. GET https://www.editableqrcode.com/.well-known/oauth-authorization-server follows a temporary redirect to the issuer's JSON metadata, including its authorization endpoint, token endpoint, signing keys and supported grants. The primary resource identifier is https://www.editableqrcode.com; Supabase remains the token issuer. Configured resource identifiers: https://www.editableqrcode.com, https://editableqrcode.com. Retrieve protected-resource metadata on the exact hostname you use, and register your client for that exact resource. Tokens remain bound to the client's registered resource.

Use authorization code + PKCE (S256), a registered redirect URI, an unpredictable state value and scope offline_access. Verify returned state before exchanging the code. The owner signs in with verified email and explicitly approves QR read access, with an unchecked optional creation permission. Existing grants remain read-only until the owner disconnects and reconnects with new consent. Send the access token only to this resource's /api/v1 endpoints or /api/mcp/account in Authorization: Bearer <token>.

The offline_access scope permits token refresh; a separate owner/client grant limits access to QR reads, image downloads and scan analytics. A grant with optional creation permission can create new codes and finish its own media uploads, using an Idempotency-Key. Read-only grants cannot create. Neither kind can edit, duplicate or delete existing codes, access billing or account settings, or read other accounts. Active account access is required. They cannot be used as a Supabase login session, for Supabase userinfo/account APIs, or for direct database/Storage access. OIDC identity tokens are intentionally not issued; do not request openid, email, profile or phone scopes. Users revoke access at /oauth/connections; revocation applies immediately, including existing tokens. Client registration is manual; dynamic registration is disabled.

API keys remain supported separately for existing integrations.

1. The user opens [Dashboard → API keys](https://www.editableqrcode.com/dashboard/api-keys).
2. The user creates a read-only key for inspection, or a read+write key for authorized changes. The plaintext key is shown once; store it securely.
3. Send the key in the HTTP header: Authorization: Bearer <key>
4. Never put keys in URLs, public files, source code, or chat transcripts. The user can revoke a key in the dashboard.

GET requests require read scope. API-key mutations require write scope; OAuth permits only explicitly approved creation and completion of that grant’s own uploads. Account access is required; inactive accounts cannot write.
Trial and Business API limits are 600 requests/minute; Pro is 60. Limits are shared across the owner's keys. Respect Retry-After on HTTP 429.
HTTP 401 means missing, invalid, revoked credentials or lost verification access. HTTP 403 means insufficient scope or account restrictions.
Do not retry authentication failures indefinitely. Ask the user to restore access.

[API documentation](https://www.editableqrcode.com/docs) · [OpenAPI description](https://www.editableqrcode.com/docs/openapi.json)

## Public MCP tools

Connect via Streamable HTTP to https://www.editableqrcode.com/api/mcp. No authentication is required for list_qr_products or get_qr_product.
These tools return public product guides only. They do not accept API keys, access user accounts, save codes, or make purchases.
Use a server-side MCP client; browser requests are restricted to this application's origins. See the [server card](https://www.editableqrcode.com/api/mcp/server-card).

## Private workspace MCP

Connect via Streamable HTTP to https://www.editableqrcode.com/api/mcp/account with an owner-authorized Bearer API key or registered Supabase OAuth token. Missing or invalid credentials return HTTP 401; OAuth-enabled deployments advertise protected-resource metadata in WWW-Authenticate. Credentials belong in transport headers, never tool arguments.

Tools: list_qr_products, get_qr_product, get_qr_schema, validate_qr_code, list_qr_codes, review_qr_code, get_qr_image, create_qr_code and complete_qr_upload. Validation does not save anything. Confirm content with the owner before creation. Review returns private content only for that owner. Create requires an idempotency_key; retries must keep it and the input unchanged. OAuth creation grants cannot edit or delete existing codes. Request limit: 256 KiB; binary media uses direct signed uploads.

[Create/review quickstart](https://www.editableqrcode.com/docs/agents#create-review) · [Interactive Swagger explorer](https://www.editableqrcode.com/docs/api)

## Agent boundaries

Public product lookup tools are read-only. They do not create accounts, save QR codes, expose private QR content, or purchase plans.
Use only credentials explicitly authorized by the account owner. Confirm destinations and content before creating or changing a QR code; confirm destructive actions and purchases with the user.
Static QR payloads cannot be edited after printing and do not have scan analytics. A new payload requires a new code.
