Connect an app
Select Connect OFAuth in the app, sign in, choose the accounts to share, and approve. Supported apps register their own private deployment automatically. You do not visit the dashboard first, copy credentials, or buy a Developer plan for your own accounts. The official Express example uses this flow by default. Its server keeps its generated client credentials in the app’s private database. The same credentials, sessions and account selection survive a restart.Add Connect OFAuth to your client
Discoverregistration_endpoint from https://api.ofauth.com/.well-known/oauth-authorization-server/v3/link. Register the installation using RFC 7591:
201 response contains client_id, a unique client_secret, and the registered metadata. Store the credentials privately and reuse them; never embed a shared secret in a public app. A native app or agent may set application_type to native and register its own loopback callback and per-installation credentials, as described in RFC 8252 section 8.4.
Registration alone creates no account grant, uses no allowance and grants no API authority. The first accepted browser consent binds that private installation to the approving workspace. An unused registration expires after 24 hours. The registration endpoint is rate-limited and supports only Operator Access scopes and confidential code/refresh grants with S256 PKCE. Developer and MCP registration remain separate.
Register one exact callback per installation. Use HTTPS, or loopback HTTP for local use (127.0.0.1, localhost or [::1]). Wildcards, fragments, embedded credentials and OAuth response parameters in callbacks are rejected. Unknown metadata is ignored; it cannot select a workspace or grant authority. OFAuth does not fetch client-supplied metadata URLs.
Register a reconnect return URL
If an auth library such as Better Auth, NextAuth or Passport owns your OAuth callback, it rejects a reconnect return as an unknown OAuth state. Register a separate return URL for reconnect with the optionalofauth_reconnect_return_uri metadata:
201 response echoes the value. This URL is accepted only as a reconnect redirect_uri; authorization requests and code exchange reject it. The registered callback remains a valid reconnect return. Invalid values return invalid_client_metadata. The URL is shown in the app’s Advanced settings.
Connect with browser OAuth
Use the SDK’sOFAuthLink authorization helper with your client ID, callback, state, S256 PKCE challenge, and requested scopes. Open the returned authorization URL in a browser. The workspace manager chooses the accounts to share and approves access. Scripts also use this browser flow; private registrations do not issue permanent API keys.
The authorization server uses the API’s /v3/link issuer. Exchange the one-use code at POST /v3/link/token using a form body, the exact callback, PKCE verifier, and confidential client authentication. Both client_secret_basic and client_secret_post are supported. The API resource is https://api.ofauth.com/v3; a token for the MCP resource does not grant API access.
Access tokens are opaque Bearer tokens that last 900 seconds. Refresh tokens stay the same and expire after 90 days without a successful authenticated refresh. A successful refresh extends that inactivity deadline. Independent app instances may refresh concurrently. Use
expires_in to schedule refresh; a lost response can be retried with the same refresh token.
Give the resource SDK your application’s access token or token getter. The resource SDK does not own token storage or refresh. If your app uses an OAuth framework, let that framework own the credential lifecycle.
Discover accounts and call Access
CallGET /v3/linked-accounts with the Bearer token. The result contains only accounts granted to this authorization. Use one returned ID as x-linked-account-id when calling the usual /v3/access/* methods and paths.
Call GET /v3/access/operations to list the supported operations for the token’s scopes, including each method, path, interaction rule, and retry policy. Purchases, batch users, multi-list writes, and generic settings remain unavailable. OnlyFans vault operations under Access are distinct from Vault+.
Operator Essential permits reads. Operator Pro and Max also permit supported writes. Write requests require an Idempotency-Key. Follow each operation’s interaction rule:
none: the operation may run unattended while current authority and allowance permit it.recent_auth: fresh browser authentication is required. Start browser OAuth again withprompt=login; refresh does not renew the authentication time.browser_confirmation: a409response returnsconfirmation_urlandexpires_at. Complete that browser step before retrying the same request with the same idempotency key andX-OFAuth-Confirmationtoken.
Reconnect a provider
For a granted account with statusneeds_reconnect or disconnected, call POST /v3/linked-accounts/{id}/reconnect with redirect_uri equal to your registered ofauth_reconnect_return_uri or callback, and a fresh state. Open the returned URL in a browser. Check the returned state and fetch the account’s status after the return.
Reconnect repairs that exact provider account. It does not issue OAuth tokens, renew consent, or add another account. The initiating access token must remain valid through the journey.
Manage or disconnect an app
Open Apps in the Operator sidebar, then Manage beside an app to see its granted accounts and access. The separate Usage page shows units over time, the top 10 request types and distinct delivered content items, with an All apps or single-app filter. Advanced settings contains the callback, client ID, secret rotation, and app disabling controls. Secret rotation affects future client authentication; it does not disconnect existing consent. Use RFC 7009POST /v3/link/revoke to revoke one access token or one refresh credential. Revoking a refresh credential also stops its access tokens and keeps durable consent. To disconnect the whole authorization, use DELETE /v3/authorization with a current Bearer token or Disconnect in the dashboard. DELETE /v3/linked-accounts/{id} removes one account grant.
Operator private apps do not include Realtime, Vault+, events, or webhooks. Losing an Operator subscription stops Operator access; it does not invalidate Developer grants paid for by another app.