Skip to content

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.

POST /v1/connect/googlebusiness/select-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.

Request body

Content-Type: application/json

  • profileId (string) required — Profile ID from your connection flow
  • locationId (string) required — The Google Business location ID selected by the user
  • pendingDataToken (string) required — Token from the OAuth callback redirect (pendingDataToken query param). Tokens and profile data are retrieved server-side from this token.
  • redirect_url (string) — Optional custom redirect URL to return to after selection

Example:

json

{
  "profileId": "507f1f77bcf86cd799439011",
  "locationId": "9281089117903930794",
  "pendingDataToken": "a1b2c3d4e5f6...",
  "redirect_url": "https://yourdomain.com/integrations/callback"
}

Responses

200 — Google Business location connected successfully

  • message (string)
  • redirect_url (string) — Redirect URL if custom redirect_url was provided
  • account (object)

400 — Missing required fields (profileId, locationId, or tempToken)

401

403 — User does not have access to the specified profile

404 — Selected location not found in available locations

500 — Failed to save Google Business connection