connect
Update Facebook page
Switch which Facebook Page is active for a connected account.
AuthorizationBearer <token>
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
accountIdstring
selectedPageIdstring
Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.connect.updateFacebookPage({ path: { accountId: 'account_abc123', }, body: { selectedPageId: 'selectedpage_abc123', },});console.log(data);{
"message": "Facebook page updated successfully",
"selectedPage": {
"id": "123456789012345",
"name": "My Brand Page"
}
}Empty
{
"error": "Unauthorized"
}Empty
List Facebook pages GET
Returns all Facebook pages the connected account has access to, including the currently selected page.
List GBP locations GET
For headless flows. Returns the list of GBP locations the user can manage. Use pendingDataToken (from the OAuth callback redirect) to list locations without consuming the token, so it remains available for select-location. Use X-Connect-Token header if connecting via API key.