Select GBP location
Complete the headless GBP flow by saving the user's selected location. The pendingDataToken is returned in your redirect URL after OAuth completes (step=select_location). Tokens and profile data are stored server-side, so only the pendingDataToken is needed here. Use X-Connect-Token header if connecting via API key.
API key authentication - use your Zernio API key as a Bearer token
In: header
Profile ID from your connection flow
The Google Business location ID selected by the user
Optional but recommended. The Google Business Account resource name ("accounts/123") that owns the selected location (returned per-location by GET /v1/connect/googlebusiness/locations). When provided, the location is resolved directly instead of by enumerating the account, which is required for accounts that own many locations. Omit only for small accounts.
Token from the OAuth callback redirect (pendingDataToken query param). Tokens and profile data are retrieved server-side from this token.
Optional custom redirect URL to return to after selection
uriResponse 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.googleBusiness.selectGoogleBusinessLocation({ body: { profileId: 'profile_abc123', locationId: 'location_abc123', pendingDataToken: 'tok_abc123', },});console.log(data);{
"message": "Google Business location connected successfully",
"redirect_url": "https://yourdomain.com/integrations/callback?connected=googlebusiness&profileId=507f1f77bcf86cd799439011&username=My+Coffee+Shop",
"account": {
"accountId": "64e1f0a9e2b5af0012ab34cd",
"platform": "googlebusiness",
"username": "My Coffee Shop",
"displayName": "My Coffee Shop",
"isActive": true,
"selectedLocationName": "My Coffee Shop",
"selectedLocationId": "9281089117903930794"
}
}{
"error": "Unauthorized"
}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.
Assign GBP location to another profile POST
Connect a Google Business location onto a DIFFERENT profile by reusing the OAuth grant from an already-connected GBP account — no browser, no re-authorization. Built for agencies whose single Google account has manager access to many client locations and who run one profile per client: connect one location the normal way (browser OAuth), then bulk-assign the rest onto each client's profile via this endpoint. The path `accountId` is a SOURCE connected GBP account (the token holder); the body `profileId` is the TARGET profile. Returns 409 if the target profile already has a Google Business connection (switch its location with PUT gmb-locations instead).