Get Google Business Selection API
The Get Google Business Selection API lists the Google Business Profile locations made available once OAuth completes. Place the short-lived, single-use selection token in the request path, then review the returned accounts and the expiresInSeconds value while the pending choice is still usable.
Endpoint summary and exact request contract
This operation fetches the Google Business Profile locations that become available once OAuth completes. The selection token has a brief lifetime and is intended for one use, so treat it as a single-use credential for this lookup and check expiresInSeconds in the response to understand how long the selection remains available. The request uses GET with the token placed in the path, and the response distinguishes a successful selection payload from a 404 error payload.
Path parameter: token
The token path parameter is required and must be a string with a length of at least 1. Supply the selection token exactly as issued for the pending selection. The documented contract places the token in the path; no query parameters or request body are documented for this operation.
200 response field map
A 200 response contains success, platform, expiresInSeconds, and accounts. The platform value is googlebusiness, and each account has type location. Use platformUserId to identify the platform user for a location, displayName for the nullable display name, imageUrl for the nullable image URI, and secondaryLabel for the secondary label. The worked example below shows the full 200 JSON shape, including the nullable fields and the accounts array.
404 response and failure handling
A 404 response contains a single required error field of type string. The documented contract specifies the 404 status and the error shape, but does not specify additional error codes or causes. Handle 404 separately from 200 by checking the status first, then reading error as a string when the status is 404.
Worked example and handling steps
Start by confirming that the selection token is present and non-empty, then send the GET request using the origin-modular request example below. On a 200 response, verify that success is present as a boolean, platform is googlebusiness, and accounts is an array; then read expiresInSeconds and each account's id, type, platformUserId, displayName, username, imageUrl, and secondaryLabel. On a 404 response, read the error string and do not treat the payload as a successful selection. Because the token is short-lived and one-time, plan to use it promptly for this lookup.
| Parameter | Location | Required | Type | Constraints |
|---|---|---|---|---|
| token | path | Yes | string | Length: 1 <= length |
Exact documented input contract; token acquisition and authentication are not specified in the supplied source.
| Field | Required | Type | Enum / nullable | Notes |
|---|---|---|---|---|
| success | Yes | boolean | - | Top-level success flag |
| platform | Yes | string | "googlebusiness" | Platform enum value |
| expiresInSeconds | Yes | number | - | Selection expiry in seconds |
| accounts | Yes | array<object> | - | Array of location accounts |
| accounts[].id | Yes | string | - | Account identifier |
| accounts[].type | Yes | string | "location" | Account type enum value |
| accounts[].platformUserId | Yes | string | - | Platform user identifier |
| accounts[].displayName | Yes | string | null | Nullable | Display name |
| accounts[].username | Yes | string | null | Nullable | Username |
| accounts[].imageUrl | Yes | string | null | Nullable; uri when string | Image URI |
| accounts[].secondaryLabel | Yes | string | - | Secondary label |
Exact documented 200 response contract.
| Field | Required | Type | Notes |
|---|---|---|---|
| error | Yes | string | Error message |
Exact documented 404 response contract; causes are not specified in the supplied source.
| Status | Response shape | Handling |
|---|---|---|
| 200 | success, platform, expiresInSeconds, accounts | Read accounts and expiresInSeconds; verify platform is googlebusiness and each account type is location |
| 404 | error | Read error as a string; do not treat the payload as a successful selection |
Distinguishes documented statuses without inventing error causes.
curl -X GET "{{API_BASE_URL}}/v1/connect/googlebusiness/selection/string"{
"success": true,
"platform": "googlebusiness",
"expiresInSeconds": 0,
"accounts": [
{
"id": "string",
"type": "location",
"platformUserId": "string",
"displayName": "string",
"username": "string",
"imageUrl": "http://example.com",
"secondaryLabel": "string"
}
]
}{
"error": "string"
}| Scope | Field | Type | Type reference | Required | Description | Constraints |
|---|---|---|---|---|---|---|
| token#1 | token | string | __0 | Yes | kind: schemaLength; value: 1 <= length | |
| response#2 | response | object | __0 | |||
| response#2 | response.success | boolean | __1 | Yes | ||
| response#2 | response.platform | string | __2 | Yes | kind: schemaValueIn; value: "googlebusiness" | |
| response#2 | response.expiresInSeconds | number | __3 | Yes | ||
| response#2 | response.accounts | array<object> | __4 | Yes | ||
| response#2 | response.accounts[] | object | __5 | |||
| response#2 | response.accounts[].id | string | __6 | Yes | ||
| response#2 | response.accounts[].type | string | __7 | Yes | kind: schemaValueIn; value: "location" | |
| response#2 | response.accounts[].platformUserId | string | __8 | Yes | ||
| response#2 | response.accounts[].displayName | string | null | __9 | Yes | ||
| response#2 | response.accounts[].displayName[variant1] | string | __9_type:string | |||
| response#2 | response.accounts[].displayName[variant2] | null | __9_type:null | |||
| response#2 | response.accounts[].username | string | null | __10 | Yes | ||
| response#2 | response.accounts[].username[variant1] | string | __10_type:string | |||
| response#2 | response.accounts[].username[variant2] | null | __10_type:null | |||
| response#2 | response.accounts[].imageUrl | string | null | __11 | Yes | kind: ; value: uri | |
| response#2 | response.accounts[].imageUrl[variant1] | string | __11_type:string | kind: ; value: uri | ||
| response#2 | response.accounts[].imageUrl[variant2] | null | __11_type:null | kind: ; value: uri | ||
| response#2 | response.accounts[].secondaryLabel | string | __12 | Yes | ||
| response#3 | response | object | __0 | |||
| response#3 | response.error | string | __1 | Yes |