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"
}
}'const res = await fetch("https://api.peume.com/v1/call/google-business-select-location", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"pendingDataToken": "your pendingDataToken"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/google-business-select-location",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"pendingDataToken": "your pendingDataToken"
}
},
)
print(res.json()["output"])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
locationIdstringThe 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.
locationsarraySeveral 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.
accountIdstringOptional 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.
googleAccountIdstringOnly 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.
pendingDataTokenRequiredstringToken from the OAuth callback redirect (pendingDataToken query param). Tokens and profile data are retrieved server-side from this token.
redirect_urlstringOptional custom redirect URL to return to after selection
