Connect

Select Facebook page

Changed on

Connects the Facebook Page the user picked after signing in, completing the Facebook or Meta Ads connection.

Complete a classic Facebook Page connection with profileId, pageId, tempToken and userProfile. Use X-Connect-Token for headless connections. The dashboard business-login picker instead sends only selectionToken and pageId to complete a Meta Ads connection. The server verifies the initiating user, profile access, current grants and connection eligibility. The profile, platform token, ad-account scope and return URL come only from the encrypted grant. Business selection requires a session or bearer authentication for the initiating user; X-Connect-Token is not accepted. It returns redirect_url with connected=metaads on success or an eligibility error redirect.

post/v1/connect/facebook/select-page

Request

  • Base URL: https://zernio.com/api
  • URL: https://zernio.com/api/v1/connect/facebook/select-page
  • Auth: one of:
    • HTTP bearer
    • API key in header X-Connect-Token

Request body

selectionTokenstring required

Encrypted dashboard business-login grant. Expires after ten minutes.

pageIdstring required

A Page ID from the granted Pages returned by listFacebookPages.

Example request

{
  "selectionToken": "ENCRYPTED_SELECTION_TOKEN"
}

Response

Facebook Page connected or business-login redirect returned.

messagestring
redirect_urlstring

Redirect URL when a custom redirect_url was provided or a business Page was selected. On an ads connect it also carries adsAccountId.

adsAccountIdstring

Ads connect only (the redirect_url carries adsConnect=true, as it does after GET /v1/connect/{platform}/ads). The metaads SocialAccount ID to use with the /v1/ads endpoints. account.accountId is the Facebook posting account. Absent when the ads account could not be created.

accountsobject[]

pageIds only. The connected accounts, same shape as account. The redirect_url then carries accountIds (comma-separated) and accountId of the first.

Changes

    • info

      added the new optional request property /

    • info

      the request property / became optional

    • info

      added the non-success response with the status

    • warning

      added the new account enum value to the / response property for the response status

    • warning

      added the new account enum value to the / response property for the response status

    • warning

      added the new account enum value to the / response property for the response status