List Facebook pages
Returns the list of Facebook Pages the user can manage after OAuth. Extract tempToken and userProfile from the OAuth redirect params and pass them here. Use the X-Connect-Token header if connecting via API key.
API key authentication - use your Zernio API key as a Bearer token
In: header
Query Parameters
Profile ID from your connection flow
Temporary Facebook access token from the OAuth callback redirect
Response Body
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.connect.facebook.listFacebookPages({ query: { profileId: 'profile_abc123', tempToken: 'tok_abc123', },});console.log(data);{
"pages": [
{
"id": "123456789",
"name": "My Brand Page",
"username": "mybrand",
"access_token": "EAAxxxxx...",
"category": "Brand",
"tasks": [
"MANAGE",
"CREATE_CONTENT"
]
}
]
}{
"error": "Unauthorized"
}{
"error": "string"
}Get pending OAuth data GET
Fetch pending OAuth data for headless mode using the pendingDataToken from the redirect URL. **Scope**: This endpoint is used only for LinkedIn organizations and Snapchat profiles, where the selection list is too large to fit in URL params. WhatsApp, Facebook, Pinterest, Google Business and other platforms pass selection state directly via URL query params on the redirect (`profileId`, `tempToken`, `step`), no pending record is created, so this endpoint will return 404 for those flows. Use the platform-specific selection endpoint instead (e.g. `/v1/connect/whatsapp/select-phone-number`). Token is one-time use and expires after 10 minutes. No authentication required.
Select Facebook page POST
Complete the headless flow by saving the user's selected Facebook page. Pass the userProfile from the OAuth redirect and use X-Connect-Token if connecting via API key.