connect
List GBP locations
Returns all Google Business Profile locations the connected account has access to, including the currently selected location.
AuthorizationBearer <token>
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
accountIdstring
Response 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.getGmbLocations({ path: { accountId: 'account_abc123', },});console.log(data);{
"locations": [
{
"id": "12345678901234567890",
"name": "My Business Location",
"accountId": "accounts/123456789",
"accountName": "My Business Account",
"address": "123 Main St, San Francisco, CA",
"category": "Restaurant",
"websiteUrl": "https://mybusiness.com"
}
],
"selectedLocationId": "12345678901234567890",
"cached": true
}{
"error": "Unauthorized"
}Empty
Select GBP location POST
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.
Update GBP location PUT
Switch which GBP location is active for a connected account.