Select Facebook page
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.
API key authentication - use your Late API key as a Bearer token
In: header
Profile ID from your connection flow
The Facebook Page ID selected by the user
Temporary Facebook access token from OAuth
Decoded user profile object from the OAuth callback
Optional custom redirect URL to return to after selection
uriResponse Body
application/json
application/json
curl -X POST "https://getlate.dev/api/v1/connect/facebook/select-page" \ -H "Content-Type: application/json" \ -d '{ "profileId": "507f1f77bcf86cd799439011", "pageId": "123456789", "tempToken": "EAAxxxxx...", "userProfile": { "id": "987654321", "name": "John Doe", "profilePicture": "https://..." }, "redirect_url": "https://yourdomain.com/integrations/callback" }'{
"message": "Facebook page connected successfully",
"redirect_url": "https://yourdomain.com/integrations/callback?connected=facebook&profileId=507f1f77bcf86cd799439011&username=My+Brand+Page",
"account": {
"accountId": "64e1f0a9e2b5af0012ab34cd",
"platform": "facebook",
"username": "mybrand",
"displayName": "My Brand Page",
"profilePicture": "https://...",
"isActive": true,
"selectedPageName": "My Brand Page"
}
}{
"error": "Unauthorized"
}List Facebook pages GET
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.
List Facebook pages GET
Returns all Facebook pages the connected account has access to, including the currently selected page.