Open the API in a window with appropriate params and headers instead of using the Curl. User is navigated to Tiktok-Business login OAuth screen. On successful login, listen on window object for message where event listener returns data in its callback function.

Sample code to listen to event data:

window.addEventListener('message', 
  function(e) {
    if (e.data && e.data.page === 'social_media_posting') {
    const { actionType, page, platform, placement, accountId, reconnectAccounts } = e.data
    }
  },
false)

Event Data Response:

{
  actionType: string,            Ex: "close" 
  page: string,                  Ex: "social-media-posting" 
  platform: string,              Ex: "tiktok-business" 
  placement: string,             Ex: "placement" 
  accountId: string,             Ex: "658a9b6833b91e0ecb8f3958" 
  reconnectAccounts: string[]]   Ex: ["658a9b6833b91e0ecb834acd", "efd2daa9b6833b91e0ecb8f3511"] 
}

The accountId retrieved from above data can be used to fetch Tiktok-Business account details using below API -

API: '/social-media-posting/oauth/tiktok-business/accounts/:accountId'

Method: GET

http
GET https://services.leadconnectorhq.com/social-media-posting/oauth/tiktok-business/start

Authorization

NameTypeRequiredExampleDescription
AuthorizationstringYesBearer token generated from the Leadway portal. See Authentication.
VersionstringYes2021-07-28API version.

Query parameters

NameTypeRequiredExampleDescription
locationIdstringYesw37swmmLbA02zgqKPpxITe2Account Id
userIdstringYesu37swmmLbA02zgqKPpxITe2User Id
pagestringNointegrationPage
reconnectstringNotrueReconnect

Responses

200 - Successful Response
400 - Bad Request
json
{}
401 - Unauthorized
json
{}
422 - Unprocessable Entity
json
{}

Example

curl -X GET 'https://services.leadconnectorhq.com/social-media-posting/oauth/tiktok-business/start' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28'

Last updated October 26, 2026

Was this page helpful?