POST/api/v4/connected-accounts/connect-facebook

Connect a Facebook account

Returns an OAuth URL to link a Facebook Pages account to your listingsAPI account.

Requires an API key. See Authentication for header format and key rotation.

Parameters

Body

NameTypeRequiredDescription
accountIdstringrequiredlistingsAPI account ID to generate the Facebook connect link for (e.g. 62670).

Sample request

Ready-to-paste body. Replace placeholder IDs and values with yours.

{
  "accountId": "62670"
}

Responses

200OAuth URL generated successfully.
{
  "data": {
    "bulkConnectLinkForFacebook": {
      "errors": null,
      "success": true,
      "url": "https://claim.verifymybiz.com/locations/redirect_oauth_bulk/facebook?onboarding=false&platform=local&token=bfac8e06-8d72-4810-9c50-ae7ee12a7b52"
    }
  }
}
400Bad request — missing or invalid accountId.
401Unauthenticated — missing or invalid API key.

Generates a short-lived OAuth URL that a user visits to authorize listingsAPI to manage their Facebook Pages in bulk. Redirect the user to the returned url; during the flow they review and accept Facebook's terms and grant the page-management permissions listingsAPI needs. The link is valid for 24 hours.

This is the Facebook counterpart to the connect-google endpoint and the first step of the bulk-connect workflow. Once authorized, the account shows up in GET /connected-accounts with a connectedAccountId used for matching and syncing.

Use case — onboarding a client's Facebook pages. After a client grants Facebook access, redirect them to the returned url. When they finish, run POST /connected-accounts/trigger-matches, review the results with GET /connected-accounts/{connectedAccountId}/connection-suggestions, and confirm the pairings via POST /connected-accounts/confirm-matches so Facebook Page data begins syncing with the matched listingsAPI locations.

Use case — re-authorizing after declined permissions. If a user skips a required Facebook permission, the connection cannot sync. Re-issue the link and have them re-authorize with all permissions granted.

For Google, use the connect-google endpoint. success: true with a non-null url means the link was generated; errors is populated only when generation fails.

curl -X POST 'https://listingsapi.com/api/v4/connected-accounts/connect-facebook' \
  -H "Authorization: API $LISTINGSAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "accountId": "<accountId>"
  }'