/api/v4/connected-accounts/connect-googleConnect a Google account
Returns an OAuth URL to link a Google Business Profile account to your Listings API account.
Parameters
Body
| Name | Type | Required | Description |
|---|---|---|---|
| input | object | required | Wrapper object. The entire request body must be nested under `input`. |
| input.successUrl | string | required | URL the user is redirected to after they successfully authorize Google. Must be an absolute https URL you control. |
| input.errorUrl | string | required | URL the user is redirected to if they cancel or the authorization fails. Must be an absolute https URL you control. |
Sample request
Ready-to-paste body. Replace placeholder IDs and values with yours.
{
"input": {
"successUrl": "https://docs.listingsapi.com/docs/api/connected-accounts-trigger-matches",
"errorUrl": "https://docs.listingsapi.com/docs/api/connected-accounts-connect"
}
}Responses
200OAuth URL generated successfully. Redirect the user to `url` to begin the Google authorization flow.
{
"data": {
"bulkConnectLinkForGoogle": {
"errors": null,
"success": true,
"url": "https://claim.verifymybiz.com/locations/redirect_oauth_bulk/google_oauth2?onboarding=false&platform=local&token=9009dc92-2b18-421f-b856-d157f3f06d6b"
}
}
}400Bad request, the body was not wrapped in `input`, or `successUrl`/`errorUrl` was omitted (GraphQL: `Variable "$input" of required type "GoogleOauthBulkInput!" was not provided`).
401Unauthenticated, missing or invalid API key.
Generates a short-lived OAuth URL that a user visits to authorize Listings API 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 one of the URLs you supplied. The link is valid for 24 hours.
Request shape. The body must be wrapped in an input object containing two required fields, successUrl and errorUrl. These are the absolute https URLs the user is returned to after they finish (or abandon) Google's consent screen; pass endpoints in your own application that resume onboarding on success and surface a retry on error. There is no accountId field, the connect link is always scoped to the account that owns the API key, and sending accountId (or a flat, unwrapped body) is rejected with an HTTP 400.
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 Listings API 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 '{
"input": {
"successUrl": "https://docs.listingsapi.com/docs/api/connected-accounts-trigger-matches",
"errorUrl": "https://docs.listingsapi.com/docs/api/connected-accounts-connect"
}
}'