OverviewProductsPlatformsAPI ReferenceResources
Your Platform Apps

Add an OAuth app

POSThttps://zernio.com/api/v1/connect/oauth-apps

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.

Authentication

AuthorizationBearer tokenRequired

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

Body

application/json

What every request needs

platformstringRequired

One of the platforms listed in platforms of GET /v1/connect/oauth-apps.

labelstring, max 80Required
clientIdstring, max 500Required
clientSecretstring, max 1000Required
Optional parameters4 fields
metaAppIdstring

Instagram only: the numeric ID of the Meta app your Instagram app lives in. Zernio uses it with metaAppSecret to register the webhook. Send both or neither.

metaAppSecretstring, max 1000

Instagram only: the secret of that Meta app. Never returned.

slackSigningSecretstring, max 1000

Slack only: the signing secret from the app's Basic Information page. Needed to receive events from your Slack app; any other platform is a 400.

scopeAreasarray of strings

Areas this app requests. Defaults to every area the platform supports; an area the platform cannot request separately is a 400.

Responses

Success· the request worked

Errors· the request failed

POST/v1/connect/oauth-apps
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"      ]    },    "sharedWebhookUrl": "http://example.com",    "hasSlackSigningSecret": true,    "slackEvents": {      "requestUrl": "http://example.com",      "botEvents": [        "string"      ]    },    "createdAt": "2019-08-24T14:15:22Z"  }}
OpenAPI specification
Was this page helpful?