var axios = require('axios');
var config = {
method: 'get',
url: 'https://us-central1-appgregator.cloudfunctions.net/googleads/customers/account-information?name=ft-4&connection_name=ga-06&customer_id=1894250756',
headers: {
'client_id': 'XXXX-XXXX.apps.googleusercontent.com',
'client_secret': 'XXX-XXXX',
'developer_token': 'XXXX',
'x-api-key': 'U2FsdG...'
}
};
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/customers/account-information?name=ft-4&connection_name=ga-06&customer_id=1894250756' \
--header 'client_id: XXXX-XXXX.apps.googleusercontent.com' \
--header 'client_secret: XXX-XXXX' \
--header 'developer_token: XXXX' \
--header 'x-api-key: U2FsdG...'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://us-central1-appgregator.cloudfunctions.net/googleads/customers/account-information?name=ft-4&connection_name=ga-06&customer_id=1894250756',
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(
'client_id: XXXX-XXXX.apps.googleusercontent.com',
'client_secret: XXX-XXXX',
'developer_token: XXXX',
'x-api-key: U2FsdG...'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;