Skip to main content
Set google business accounts
POST https://services.leadconnectorhq.com/social-media-posting/oauth/{locationId}/google/locations/{accountId}

Autorización

Authorization
string
required
Bearer token generado desde el portal Leadway. Ver Autenticación.
Version
string
default:"2021-07-28"
required
Versión de la API.

Path parameters

locationId
string
default:"w37swmmLbA02zgqKPpxITe2"
required
Account Account Id
accountId
string
default:"w37swmmLbA02zgqKPpxITe"
required
Account Id

Body

location
object
account
object
companyId
string
default:"sdfdsfdsfEWEsdfsdsW32dd"
Company ID

Respuestas

success
boolean
default:"True"
required
Success or Failure
statusCode
number
default:"201"
required
Status Code
message
string
default:"Added Google Business Account"
required
Message
results
object
Requested Results
{
  "success": true,
  "statusCode": 201,
  "message": "Added Google Business Account"
}
{}
{}
{}

Ejemplo

curl -X POST 'https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/google/locations/YOUR_accountId' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -d '{
  "location": {},
  "account": {},
  "companyId": "sdfdsfdsfEWEsdfsdsW32dd"
}'
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/google/locations/YOUR_accountId', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
    Version: '2021-07-28',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"location": {}, "account": {}, "companyId": "sdfdsfdsfEWEsdfsdsW32dd"}),
});
const data = await response.json();
import os, requests
response = requests.request(
    'POST',
    'https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/google/locations/YOUR_accountId',
    headers={
        'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
        'Version': '2021-07-28',
        'Content-Type': 'application/json',
    },
    json={"location": {}, "account": {}, "companyId": "sdfdsfdsfEWEsdfsdsW32dd"},
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/google/locations/YOUR_accountId');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
        'Version: 2021-07-28',
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode({'location': {}, 'account': {}, 'companyId': 'sdfdsfdsfEWEsdfsdsW32dd'}),
]);
$data = json_decode(curl_exec($ch), true);