POSTapi.synup.com/api/v4/connected-accounts/connect-google
Connect Google Profile to Account
This API initiates the process of connecting a new Google My Business (GMB) account to the system. The response provides a URL for the user to complete Google's OAuth authentication flow.
Important Notes:
- The response includes a URL that the user must visit to authenticate and connect their GMB account.
- The provided URL is valid for 24 hours.
- When the user accesses the URL, they are redirected to Google’s OAuth authentication flow.
- During OAuth, the user must:
- Review and accept Google’s terms and conditions.
- Grant necessary permissions for integration.
- After OAuth authentication:
- If successful, the user is redirected to the successUrl provided in the request.
- If permissions are declined or the process fails, the user is redirected to the errorUrl.
Requires an API key. Send it as
Authorization: API <your-key> — see Getting started.Parameters
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Content-Type | string | required |
Body
| Name | Type | Required | Description |
|---|---|---|---|
input | object | optional | |
input.errorUrl | string | required | Redirect URL in case of Error |
input.successUrl | string | required | Redirect URL in case of Success |
Request
Request
curl -X POST 'https://api.synup.com/api/v4/connected-accounts/connect-google' \
-H 'Authorization: API YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"input": {
"errorUrl": "http://www.errorurl.com",
"successUrl": "http://www.successurl.com"
}
}'const res = await fetch('https://api.synup.com/api/v4/connected-accounts/connect-google', {
method: 'POST',
headers: {
Authorization: 'API YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"input": {
"errorUrl": "http://www.errorurl.com",
"successUrl": "http://www.successurl.com"
}
}),
});
const data = await res.json();import requests
res = requests.post(
"https://api.synup.com/api/v4/connected-accounts/connect-google",
headers={
"Authorization": "API YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"input": {
"errorUrl": "http://www.errorurl.com",
"successUrl": "http://www.successurl.com"
}
},
)
data = res.json()req, _ := http.NewRequest("POST", "https://api.synup.com/api/v4/connected-accounts/connect-google", bytes.NewBufferString(payload))
req.Header.Set("Authorization", "API YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)Responses
| Status | Description |
|---|---|
200 | Successfully generated connection URL |
400 | Bad request - invalid input |
Example response
{
"data": {
"bulkConnectLinkForGoogle": {
"clientMutationId": null,
"errors": null,
"success": true,
"url": "https://claim.verifymybiz.com/locations/redirect_oauth_bulk/google_oauth2?onboarding=false&platform=local&token=47cc832a-31ce-4de5-8768-c541a8331800"
}
}
}Response body
| Name | Type | Required | Description |
|---|---|---|---|
data | object | optional | |
data.bulkConnectLinkForGoogle | object | optional | |
data.bulkConnectLinkForGoogle.success | boolean | optional | True if the request was successful, otherwise False |
data.bulkConnectLinkForGoogle.url | string | optional | The URL which needs to be visited to initiate the connect process |
data.bulkConnectLinkForGoogle.errors | array of string | optional | Array of error messages if any |