connect
Select GBP location
Complete the headless flow by saving the user's selected GBP location. Include userProfile from the OAuth redirect (contains refresh token). Use X-Connect-Token if connecting via API key.
AuthorizationBearer <token>
API key authentication - use your Late API key as a Bearer token
In: header
profileIdstring
Profile ID from your connection flow
locationIdstring
The Google Business location ID selected by the user
tempTokenstring
Temporary Google access token from OAuth
userProfile?
Decoded user profile from the OAuth callback. Contains the refresh token. Always include this field.
redirect_url?string
Optional custom redirect URL to return to after selection
Format
uriResponse Body
application/json
application/json
curl -X POST "https://getlate.dev/api/v1/connect/googlebusiness/select-location" \ -H "Content-Type: application/json" \ -d '{ "profileId": "507f1f77bcf86cd799439011", "locationId": "9281089117903930794", "tempToken": "ya29.xxxxx...", "userProfile": { "id": "113303573364907650416", "name": "John Doe", "refreshToken": "1//0gxxxxx...", "tokenExpiresIn": 3599, "scope": "https://www.googleapis.com/auth/business.manage" }, "redirect_url": "https://yourdomain.com/integrations/callback" }'{
"message": "Google Business location connected successfully",
"redirect_url": "https://yourdomain.com/integrations/callback?connected=googlebusiness&profileId=507f1f77bcf86cd799439011&username=My+Coffee+Shop",
"account": {
"accountId": "64e1f0a9e2b5af0012ab34cd",
"platform": "googlebusiness",
"username": "My Coffee Shop",
"displayName": "My Coffee Shop",
"isActive": true,
"selectedLocationName": "My Coffee Shop",
"selectedLocationId": "9281089117903930794"
}
}Empty
{
"error": "Unauthorized"
}Empty
Empty
Empty