Skip to main content
Version: 2023-02-21

Start OAuth Flow (Step 1 of 3)

GET 

/social-media-posting/oauth/:platform/start

OAuth Connection Flow - Step 1: Initiate OAuth

This is the first step in the 3-step OAuth flow to connect a social media account:

  1. Start OAuth (this endpoint) → User authenticates with the platform
  2. Get Accounts → Retrieve available pages/channels to connect
  3. Attach Account → Connect the selected account to your location

How to Use

Open this API in a browser window (not via cURL) with the required query parameters. The user will be redirected to the platform's OAuth login screen.

Receiving the OAuth Response

After successful authentication, the OAuth window will post a message back to your application. Listen for this message to get the accountId needed for the next step.

window.addEventListener('message', function(e) {
if (e.data && e.data.page === 'social_media_posting') {
const { actionType, page, platform, placement, accountId, reconnectAccounts } = e.data;
// Use accountId for Step 2: GET /oauth/{locationId}/{platform}/accounts/{accountId}
}
}, false);

Event Data Response

FieldTypeExampleDescription
actionTypestring"close"The action type
pagestring"social-media-posting"Source page identifier
platformstring"facebook"The OAuth platform
placementstring"placement"Placement context
accountIdstring"658a9b6833b91e0ecb8f3958"Use this for Step 2
reconnectAccountsstring[]["658a9b...", "efd2da..."]Accounts that need reconnection

Next Step

Use the accountId from the response to call:

GET /social-media-posting/oauth/{locationId}/{platform}/accounts/{accountId}

Platform Notes

  • bluesky: Currently not supported, will return an error
  • tiktok-business: Uses a separate business OAuth flow

Request

Responses

Successful Response