PeumeAPI

Social publishing & inbox · Google Business

Select location

Complete the headless 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.

$0.002 per callRuns on an account you connect

Call it

curl https://api.peume.com/v1/call/google-business-select-location \
  -H "Authorization: Bearer $PEUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "pendingDataToken": "your pendingDataToken"
  }
}'

Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: google-business-select-location.

Parameters

locationIdstring

The location ID selected by the user. Send this or locations, not both. Omit both to connect with no location (`needsLocation: true`), allowed only when the connect used allowNoLocation=true, the sign-in listed no locations and it is not a reconnect.

locationsarray

Several locations to connect from one sign-in, each as its own account. A single location behaves exactly like locationId. The sign-in is used once for the whole batch and handed back only if none connected. With two or more distinct locations, the response lists `accounts` and `failed` instead of `account`, and the request is refused with 400 on a reconnect.

accountIdstring

Optional but recommended. The 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.

googleAccountIdstring

Only when connecting with no location. The Account resource name ("accounts/123") to attach. Defaults to the sign-in's personal account, else its first account. Must be one of the accounts the sign-in lists, otherwise 400.

pendingDataTokenRequiredstring

Token from the OAuth callback redirect (pendingDataToken query param). Tokens and profile data are retrieved server-side from this token.

redirect_urlstring

Optional custom redirect URL to return to after selection

Start free · $1 of calls included

Every API your product needs. One key.

7,267 endpoints, one bill, and you only pay for calls that work.