/api/v4/connected-accounts/connect-googleConnect a Google account
Returns an OAuth URL to link a Google Business Profile account to your listingsAPI account.
Parameters
Body
| Name | Type | Required | Description |
|---|---|---|---|
| accountId | string | required | listingsAPI account ID to generate the Google 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": {
"bulkConnectLinkForGoogle": {
"errors": null,
"success": true,
"url": "https://listingsapi.com/locations/redirect_oauth_bulk/google?onboarding=false&platform=local&token=9009dc92-2b18-421f-b856-d157f3f06d6b"
}
}
}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 Google Business Profile locations in bulk. Redirect the user to the returned url; they complete Google's consent screen and are returned to listingsAPI's post-connect page. The link is valid for 24 hours.
This is the first step of the bulk-connect workflow. Once the account is authorized it appears in the list connected accounts endpoint (GET /connected-accounts) with a connectedAccountId you use for every later call.
Use case — onboarding an agency client's Google profiles. A new client hands over their Google Business Profile access. Call this endpoint, redirect them to the returned url, and after they consent their Google listings become available under the new connected account. Then run POST /connected-accounts/trigger-matches to match those Google listings against your listingsAPI locations, review the pairings with GET /connected-accounts/{connectedAccountId}/connection-suggestions, and finalize them with POST /connected-accounts/confirm-matches.
Use case — repairing expired credentials. When a connected account's Google token expires, listing updates stop syncing. Re-issue a connect link with this endpoint and have the account owner re-authorize; the existing connection is refreshed rather than duplicated.
For Facebook, use the connect-facebook 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-google' \
-H "Authorization: API $LISTINGSAPI_KEY" \
-H 'Content-Type: application/json' \
-d '{
"accountId": "<accountId>"
}'