Skip to main content
Create a Google Ads integration for a account
POST https://services.leadconnectorhq.com/ad-publishing/google/integration

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.

Body

locationId
string
default:"loc_abc123"
required
Account identifier
adAccountId
string
default:"123-456-7890"
required
Ad account identifier
mccId
string
default:"987-654-3210"
required
MCC identifier

Respuestas

{}
{}
{}

Ejemplo

curl -X POST 'https://services.leadconnectorhq.com/ad-publishing/google/integration' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -d '{
  "locationId": "loc_abc123",
  "adAccountId": "123-456-7890",
  "mccId": "987-654-3210"
}'
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/integration', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
    Version: '2021-07-28',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"locationId": "loc_abc123", "adAccountId": "123-456-7890", "mccId": "987-654-3210"}),
});
const data = await response.json();
import os, requests
response = requests.request(
    'POST',
    'https://services.leadconnectorhq.com/ad-publishing/google/integration',
    headers={
        'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
        'Version': '2021-07-28',
        'Content-Type': 'application/json',
    },
    json={"locationId": "loc_abc123", "adAccountId": "123-456-7890", "mccId": "987-654-3210"},
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/ad-publishing/google/integration');
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({'locationId': 'loc_abc123', 'adAccountId': '123-456-7890', 'mccId': '987-654-3210'}),
]);
$data = json_decode(curl_exec($ch), true);