Skip to content

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.

Path parameters
ParameterLocationRequiredTypeConstraints
tokenpathYesstringLength: 1 <= length

Exact documented input contract; token acquisition and authentication are not specified in the supplied source.

200 response fields
FieldRequiredTypeEnum / nullableNotes
successYesboolean-Top-level success flag
platformYesstring"googlebusiness"Platform enum value
expiresInSecondsYesnumber-Selection expiry in seconds
accountsYesarray<object>-Array of location accounts
accounts[].idYesstring-Account identifier
accounts[].typeYesstring"location"Account type enum value
accounts[].platformUserIdYesstring-Platform user identifier
accounts[].displayNameYesstring | nullNullableDisplay name
accounts[].usernameYesstring | nullNullableUsername
accounts[].imageUrlYesstring | nullNullable; uri when stringImage URI
accounts[].secondaryLabelYesstring-Secondary label

Exact documented 200 response contract.

404 response fields
FieldRequiredTypeNotes
errorYesstringError message

Exact documented 404 response contract; causes are not specified in the supplied source.

Failure and expiry handling matrix
StatusResponse shapeHandling
200success, platform, expiresInSeconds, accountsRead accounts and expiresInSeconds; verify platform is googlebusiness and each account type is location
404errorRead error as a string; do not treat the payload as a successful selection

Distinguishes documented statuses without inventing error causes.

Request example
curl -X GET "{{API_BASE_URL}}/v1/connect/googlebusiness/selection/string"
200 response example
{
  "success": true,
  "platform": "googlebusiness",
  "expiresInSeconds": 0,
  "accounts": [
    {
      "id": "string",
      "type": "location",
      "platformUserId": "string",
      "displayName": "string",
      "username": "string",
      "imageUrl": "http://example.com",
      "secondaryLabel": "string"
    }
  ]
}
404 response example
{
  "error": "string"
}
Interface fields
ScopeFieldTypeType referenceRequiredDescriptionConstraints
token#1tokenstring__0Yeskind: schemaLength; value: 1 <= length
response#2responseobject__0
response#2response.successboolean__1Yes
response#2response.platformstring__2Yeskind: schemaValueIn; value: "googlebusiness"
response#2response.expiresInSecondsnumber__3Yes
response#2response.accountsarray<object>__4Yes
response#2response.accounts[]object__5
response#2response.accounts[].idstring__6Yes
response#2response.accounts[].typestring__7Yeskind: schemaValueIn; value: "location"
response#2response.accounts[].platformUserIdstring__8Yes
response#2response.accounts[].displayNamestring | null__9Yes
response#2response.accounts[].displayName[variant1]string__9_type:string
response#2response.accounts[].displayName[variant2]null__9_type:null
response#2response.accounts[].usernamestring | null__10Yes
response#2response.accounts[].username[variant1]string__10_type:string
response#2response.accounts[].username[variant2]null__10_type:null
response#2response.accounts[].imageUrlstring | null__11Yeskind: ; value: uri
response#2response.accounts[].imageUrl[variant1]string__11_type:stringkind: ; value: uri
response#2response.accounts[].imageUrl[variant2]null__11_type:nullkind: ; value: uri
response#2response.accounts[].secondaryLabelstring__12Yes
response#3responseobject__0
response#3response.errorstring__1Yes