OAuth 2.1
Add “Connect with Zernio”
to your app
Let your users connect their Zernio workspace to your product. Your app calls the Zernio API with the access they approve, and nobody has to paste an API key.
Register a client in one API call, no approval queue
Used by the Claude and ChatGPT connectors
Users see and revoke every connected app
Four steps to your first call
Register your app
POST /api/oauth/register returns a client_id, plus a client_secret for server apps. Public clients (SPA, mobile, CLI) and confidential server apps both work.
Send users to consent
Redirect to zernio.com/oauth/authorize with a PKCE challenge and the scopes you need. The user picks a workspace and approves.
Exchange the code
Trade the code and verifier at /api/oauth/token for an access token (1 hour) and a refresh token (30 days, rotates on each use).
Call the API
Send the access token as a Bearer header to the same REST API as API keys, limited to what the user granted.
POST /api/oauth/register
curl -X POST https://zernio.com/api/oauth/register \
-H "Content-Type: application/json" \
-d '{
"client_name": "Your App",
"redirect_uris": ["https://yourapp.com/oauth/callback"],
"token_endpoint_auth_method": "client_secret_basic",
"scope": "posts:read posts:write analytics:read"
}'What your users see and what they keep
Users decide what your app can do, and they can take it back at any time.
Your app, by name
The consent screen shows your app's name, your logo when it is hosted on the same site as your redirect URIs, and the site the user goes back to.
Their workspace
The user picks which Zernio workspace your app acts in.
Access per area
Before approving, the user can set each area you asked for to Off, Read, or Read and write, up to what you requested.
Money writes start at Read
Write access that can spend ad budget, refund orders, record creator payouts or move money starts at Read. The user has to turn it on.
Connected apps and revoke
Users see every connected app in Settings, Connected apps, and can revoke it there. Your app can call POST /api/oauth/revoke (RFC 7009); revoking any token ends the whole authorization.
403 names the missing scope
A call outside the grant answers 403 with a WWW-Authenticate header that names the scope to ask for.
Ask for what you need and nothing else
Read and write scopes for 11 areas, plus email for the user's identity.
Posts
posts:readposts:writeAccounts and profiles
accounts:readaccounts:writeAnalytics
analytics:readanalytics:writeInbox and messages
messaging:readmessaging:writeContacts and webhooks
automations:readautomations:writeAds
ads:readads:writeWrite starts at Read: it can spend their ad budget.
Shop
commerce:readcommerce:writeWrite starts at Read: it can refund orders.
Calendars
calendar:readcalendar:writeFiles
files:readfiles:writeCreator campaigns
campaigns:readcampaigns:writeWrite starts at Read: it can record creator payouts.
Balance and payouts
money:readmoney:writeWrite starts at Read: it can move money from their balance.
emailThe user's email, from /api/oauth/userinfo.
Same API, different owner
API keys and OAuth tokens use the same API (https://zernio.com/api/v1, also at api.zernio.com/v1). The difference is whose workspace you act on.
Use an API key
Your own Zernio account
Your backend, scripts and internal tools
No consent screen: you own the workspace
Use OAuth
Other people's Zernio workspaces
Your product, used by Zernio customers
Users approve access instead of pasting a key
Frequently Asked Questions
Zernio is an OAuth 2.1 authorization server. Your app sends a Zernio customer to a consent screen, they pick a workspace and approve, and your app calls the Zernio API on that workspace. The Claude and ChatGPT connectors use it in production today.
No. Register a client yourself with dynamic client registration: POST https://zernio.com/api/oauth/register with your app name and redirect URIs. There is no application form and no approval queue.
Public clients such as single-page apps, mobile apps and CLIs, and confidential server apps that authenticate with client_secret_post or client_secret_basic. Every client uses the authorization code flow with PKCE (S256).
Access tokens last 1 hour. Refresh tokens last 30 days and rotate on each use, so store the new refresh token every time you refresh.
The API answers 403 with a WWW-Authenticate header that names the scope to ask for. Send the user through consent again with that scope.
Yes. Get the official button in primary, secondary and outline variants as SVG or PNG, with an HTML snippet and a React example, at https://docs.zernio.com/oauth/button.
600 requests a minute per Zernio user.
At https://zernio.com/.well-known/oauth-authorization-server (RFC 8414). It lists the endpoints, supported scopes and client authentication methods.
Start with the OAuth docs
Register a client, follow the quickstart, and make your first call on a user's workspace.