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
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.
List GBP locations GET
Returns all Google Business Profile locations the connected account has access to, including the currently selected location.