Facebook Pixel tracker

Brand2Social API Documentation

Comprehensive guide to Brand2Social API endpoints

Fetch Next Accounts

This endpoint is used to fetch the next set of accounts (pages, profiles, or channels) for a connected social account, using pagination from the previous fetch-all-accounts response.

Use this endpoint when next_page is returned in the fetch-all-accounts response. This helps retrieve remaining accounts in batches.

  • Method: POST
  • Endpoint: /api/api-services/v1/brand-service/fetch-next-accounts
  • Returns: Paginated list of accounts for the connected brand

Fetch Next Accounts

POST https://app.brand2social.com/api/api-services/v1/brand-service/fetch-next-accounts

Header / Body ParamTypeRequiredDescription
Authorizationstring (header)YesBearer token
brand_idint64 (body)YesID of the brand
platformstring (body)YesOptions: [ FACEBOOK, INSTAGRAM, YOUTUBE, LINKEDIN, GOOGLEMYBUSINESS ]
account_idstring (body)YesThe ID of the primary connected account/profile
paginationstring (body)YesPagination token received from fetch-all-accounts response (next_page field)
    
    
curl --location 'https://app.brand2social.com/api/api-services/v1/brand-service/fetch-next-accounts' \
  --header 'Authorization: Bearer B2S_dummyToken' \
  --data-raw '{
    "brand_id": 123,
    "platform": "FACEBOOK",
    "account_id": "xxxxxxxxxx",
    "pagination": "ttttttttttt"
  }'
    
  

Response

{
  "status": "SUCCESS",
  "http_code": 200,
  "message": "Fetched next accounts",
  "data": {
    "account_id": "xxxxxxxxxx",
    "accounts": [
      {
        "id": "zzzzzzzzzz",
        "name": "Next Page Account",
        "profile_image": "https://image.com/pic2.png",
        "is_integrated": false
      }
    ],
    "next_page": "vvvvvvvvvvv"
  }
}