Add an OAuth app
Saves your app's client ID and secret for a platform. The keys are checked with the platform first: keys it rejects return 400 OAUTH_APP_KEYS_REJECTED and are not saved; keys it could not check are saved with status unchecked. Allow the returned redirectUri in your app's settings on the platform before connecting. Only the account owner or a full-access team member can add apps, and not with a profile-scoped API key.
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.connect.createOAuthApp({ body: { platform: 'twitter', label: 'string', clientId: 'client_abc123', clientSecret: 'string', },});console.log(data);{ "app": { "id": "string", "platform": "string", "label": "string", "clientId": "string", "scopeAreas": [ "posting" ], "status": "ok", "lastCheckedAt": "2019-08-24T14:15:22Z", "lastError": "string", "accountCount": 0, "redirectUri": "http://example.com", "webhook": { "callbackUrl": "http://example.com", "verifyToken": "string", "object": "page", "fields": [ "string" ] }, "createdAt": "2019-08-24T14:15:22Z" }}Connect a Whop account
Connect a Whop account with an Account API key from the Whop dashboard (Developer > API keys). The key only has to be able to read its own account: Zernio calls `GET /accounts/me` once to learn the account id (`biz_...`) and name, then stores the key. What the connection unlocks today is the Whop Pixel through the tracking-tags API: the account id is the pixel, so `GET /v1/accounts/{accountId}/tracking-tags` lists it and `POST .../tracking-tags/{biz_...}/install` puts it on a Shopify store or WordPress site. Whop campaigns are not managed through Zernio. One Whop account per profile.
Remove an OAuth app
Removes the app. Accounts connected through it can no longer refresh their tokens, so when any are connected the call returns 409 OAUTH_APP_IN_USE with `details.accountCount` unless `confirm=true` is passed. With confirm, those accounts are marked as needing reconnection and each fires `account.disconnected`.