Skip to main content
Use Connect with Meradomo when your app ships a separate client — a mobile app, a CLI, or a web client — that connects into the user’s Meradomo from another device. It’s the OAuth 2.0 authorization-code flow with PKCE (S256).
There is intentionally no SDK in v1. The OAuth endpoints below and the local management API are the integration surface; remote-notes-client is a full reference implementation.

Registering a client

Self-serve client registration is coming to the developer portal. Until then, request an OAuth client for your app. You’ll receive a clientId and — for confidential clients (ones that can keep a secret) — a clientSecret shown once. Public clients (no secret) are on the roadmap; confidential clients must send the secret on every token request. You register one or more exact redirectUris.

Authorization flow

1

Generate PKCE

2

Send the user to /oauth/authorize

If the user isn’t signed in, they’re bounced to sign-in and returned here afterward. They see a consent page — “<App name> wants to connect to your Meradomo.” On approval the browser redirects to redirect_uri?code=…&state=…; on denial, ?error=access_denied.
3

Exchange the code for tokens

Response 200:
host is the user’s root address; a published app lives at <app-name>.<host>.

Access token claims

Access tokens are EdDSA (Ed25519) compact JWS. Payload: The signing public key is at GET https://account.meradomo.com/auth/pubkey (JSON with a publicKey PEM field). The agent fetches and caches this key.

Refresh tokens

Refresh tokens are opaque, single-use, and stored hashed.
Same response shape as the code exchange. The old refresh token is invalidated immediately — replaying it returns 400 invalid_grant. Refreshing after the grant was revoked returns 400 access_denied.

Revocation

The user can revoke your app from the menu-bar app or their account dashboard. Revocation is asynchronous within a short poll window:
  • New refresh-token requests fail immediately.
  • Existing access tokens stop working within the next agent poll cycle (a few seconds in production).
The agent does not make a per-request call to validate tokens — revocation lands within the poll window.

CORS

POST /oauth/token and GET /auth/pubkey include permissive CORS headers so browser-based clients can call them directly.

Error codes