Build an app
Register an app, let people install it with OAuth, and read their numbers with scopes.
Anyone can build an app on Okidoki: a report for a TV, a link to a CRM, a dashboard an agency gives its clients. People install your app with one tap, see exactly what it may do, and can remove it whenever they like.
Okidoki's own Wallboard is built this way, on the same public API.
#What an app can and cannot see
An app gets only what the person allowed, and only totals: visits per page, sources, countries, goals, revenue per day. Okidoki stores no personal data, so there is none to give.
An app can never see the account's email address, team, keys, passkeys or billing, and cannot add sites or change settings. Any other endpoint answers 403 with the code not_for_apps.
#Scopes
| Scope | What the app may do | Endpoints |
|---|---|---|
stats:read | Read visits and reports, as totals | GET /sites/:site/summary, /insights, /reports/:report, /goals, /funnels, /moments, /benchmarks |
revenue:read | Read sales and revenue, never who bought | GET /sites/:site/revenue, the reports revenue and customers, and with stats:read the CSV /export |
events:read | Read recent events, like a traffic spike or a sale, and get them sent as they happen | GET /sites/:site/events, and GET, POST and DELETE on /webhooks for the app's own webhooks |
goals:write | Add and remove goals and funnels | POST and DELETE on /sites/:site/goals and /sites/:site/funnels |
share:write | Make and remove read-only share links | /sites/:site/share-links |
notes:write | Add notes to the timeline, like "Newsletter sent" | POST /sites/:site/occasions/notes (reading them needs stats:read) |
ask:use | Okidoki AI questions. Each one uses one of the account's questions | GET and POST /sites/:site/ask |
GET /sites and GET /sites/:site work for every app, so it knows which sites it was given, and so do campaign links (GET /campaign-places, GET /sites/:site/campaign-link), which store nothing. The weekly brief and next steps (/brief, /next-steps) need both stats:read and revenue:read, because they mention revenue. A missing scope answers 403 with the code missing_scope. The measurement plan, billing and the MCP server are for people and their agents, not for apps.
An app with events:read can make webhooks for itself, one per automation (that is how Zapier, Make and n8n work). It only sees and removes the webhooks it made with its own key, an account can have 100 of them on top of its own 10, and they stop when the app is removed.
#1. Register your app
Sign in to Okidoki and open Settings → Connections → Apps → Build your own app. Give it:
- a name,
- one or more redirect addresses:
https,httponlocalhost, or your app's own scheme, - the scopes it needs,
- whether it runs on a server and can keep a secret.
You get a client ID like okapp_…. Server apps also get a client secret, shown once.
Who can install it:
| Setting | Who |
|---|---|
| Only this account | You. Good for your own tools. |
| Anyone with the link | Anyone you give the install link. The install page says Okidoki has not reviewed the app. |
| In the catalog | Everyone, from Settings → Connections → Apps. The catalog is open to apps by Okidoki for now. |
#2. Send people to install it
Okidoki uses OAuth 2.1 with PKCE. Send the person to:
https://okidoki.sh/oauth/authorize
?response_type=code
&client_id=okapp_...
&redirect_uri=https://example.com/okidoki/callback
&scope=stats:read revenue:read
&state=...
&code_challenge=...
&code_challenge_method=S256scope may be some or all of the scopes you registered; leave it out to ask for all of them. The person signs in to Okidoki, sees what your app may do, picks one site or all of them, and taps Install. They come back to your redirect address with code and state.
#3. Swap the code for a key
curl -X POST https://okidoki.sh/oauth/token \
-d grant_type=authorization_code \
-d code=okac1... \
-d client_id=okapp_... \
-d redirect_uri=https://example.com/okidoki/callback \
-d code_verifier=... \
-d client_secret=okas_...Leave out client_secret for apps without one. Server apps may send the ID and secret as HTTP Basic instead. A code works once and for two minutes.
{ "access_token": "oks_...", "token_type": "Bearer", "scope": "stats:read revenue:read" }The key does not expire. It stops working when the person removes your app, when you delete the app, or if Okidoki turns the app off. Then calls answer 401: send the person through install again.
#4. Call the API
curl -H "Authorization: Bearer oks_..." "https://okidoki.sh/api/v1/sites"
curl -H "Authorization: Bearer oks_..." "https://okidoki.sh/api/v1/sites/example.com/reports/pages?period=7d"Everything else works as in API basics and the API reference. Reads count toward the account's daily limit on Free, as for any key.
#Rules for apps
- Ask only for the scopes you need.
- Do not try to recognise or follow visitors, or to combine Okidoki's totals with personal data.
- Use your own name: only Okidoki's apps may use the name Okidoki.
- Okidoki may turn off an app that breaks these rules. Its keys stop working at once.
Questions, or want your app in the catalog? Write to hello@okidoki.sh.