var axios = require('axios');
var config = {
method: 'get',
url: 'https://us-central1-appgregator.cloudfunctions.net/googleads/ads?name=ft-4&connection_name=ga-06&customer_id=8171576147',
headers: {
'login-customer-id': '1894250756',
'client_id': 'XXX-XXX.apps.googleusercontent.com',
'client_secret': 'XXX-XXX',
'developer_token': 'XXXX',
'x-api-key': 'U2Fsd...'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
curl --location --request GET 'https://us-central1-appgregator.cloudfunctions.net/googleads/ads?name=ft-4&connection_name=ga-06&customer_id=8171576147' \
--header 'login-customer-id: 1894250756' \
--header 'client_id: XXX-XXX.apps.googleusercontent.com' \
--header 'client_secret: XXX-XXX' \
--header 'developer_token: XXXX' \
--header 'x-api-key: U2Fsd...'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://us-central1-appgregator.cloudfunctions.net/googleads/ads?name=ft-4&connection_name=ga-06&customer_id=8171576147',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'login-customer-id: 1894250756',
'client_id: XXX-XXX.apps.googleusercontent.com',
'client_secret: XXX-XXX',
'developer_token: XXXX',
'x-api-key: U2Fsd...'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;