Closed gergelyke closed 8 years ago
No plans that I know of. google-api-nodejs-client currently only supports APIs that are available in the Google APIs Discovery Service, and adwords isn't available, because it's an older SOAP-based service.
Googleads has client libraries for Java, PHP, Python, .NET, Perl, and Ruby.
Perhaps @vtsao can comment on whether googleads has any plans regarding this.
Correct, we don't provide a Node.js client library for AdWords or DFP and there aren't really any plans to at the moment.
Just for reference - I'm currently using this library to get some simple requests through to AdWords;
Body:
<?xml version="1.0"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<ns1:RequestHeader xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201603" soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0">
<ns1:clientCustomerId>xxx-xxx-xxxx</ns1:clientCustomerId>
<ns1:developerToken>xxxxxx</ns1:developerToken>
<ns1:userAgent>xxxxx</ns1:userAgent>
<ns1:validateOnly>false</ns1:validateOnly>
<ns1:partialFailure>false</ns1:partialFailure>
</ns1:RequestHeader>
</soapenv:Header>
<soapenv:Body>
<query xmlns="https://adwords.google.com/api/adwords/cm/v201603">
<query> SELECT Id, Name, Status, CampaignId, CampaignName, Settings ORDER BY Name </query>
</query>
</soapenv:Body>
</soapenv:Envelope>
Request:
var google = require('googleapis');
var oauth2client = google.auth.OAuth2(client_id, client_secret, redirect_url);
oauth2client.setCredentials({refresh_token: refresh_token});
oauth2client.request({
uri: 'https://adwords.google.com/api/adwords/cm/v201603/CampaignService',
method: 'POST',
headers: {
'Content-Type': 'application/xml',
},
body: body
}, function (err, res, body) {
console.log('err', err);
console.log('res.statusCode', res.statusCode);
console.log('body.body', body.body);
return callback(err, body);
});
If anyone is interested in this, I created a feature complete node adwords sdk here: https://github.com/ChrisAlvares/node-adwords that follows the php sdk pretty closely, but with nodeisms.
@ChrisAlvares is it possible to use node-adwords without giving client customer id?
@vincent714 yes
Dear @ChrisAlvares
We are trying to retrieve the list of client customer IDs for a given manager account using the following code (trying through npmrunkit tool).
let user = new AdwordsUser({ client_id: 'CLIENT_ID', //this is the api console client_id client_secret: 'CLIENT_SECRET', refresh_token: 'REFRESH_TOKEN' }); let customerService = user.getService('CustomerService', 'v201802')
We are always getting the result as 'undefined'.
Can you please advise on why we are seeing this error?
Hi! Now that there's a new non-SOAP Ads API, are there any thoughts or roadmap plans to adding official support here?
I'd also be interested in having adwords support.
I'd also be interested in having adwords support.
I've found this repo if anyone stumbles on this old thread https://github.com/opteo/google-ads-api
@AlonMiz Thanks for suggest, but this repo is unofficial, can we believe it ? https://github.com/opteo/google-ads-api
it was working for me, and it'd seem reasonable in the maintenance, code and popularity
@AlonMiz Yes, thanks for your experience.
Hey,
any plans on adding adwords support for this library? Also, for the time being how can we use the adwords API from Node.js?
Thanks a lot!