Error: Got 400 response in google-adwords npm (nodejs)

2015-09-24 Thread vikashverma
This is what i m trying but not able to get data. Always getting error 400.


var ga= require('google-adwords');
ga.use({
  clientID: 'myClientID',
  clientSecret: 'myClientSecret',
   developerToken: 'myDevToken' 
 });

 ga.use({
 refreshToken: 'myRefreshToken', // getting from oauth2.0
  clientCustomerID: 'myCustomerID' // Adwords Customer ID
 });
ga.awql()
 .select('Date,Clicks')
 .from('ACCOUNT_PERFORMANCE_REPORT')
 .during('20150909,20150924')
 .send().then(function(results) {
 console.log(results);
 // your code here 
 }).catch(function(error) {
   console.log(error);
   // error handling code here 
})

I am getting this error
" { [Error: got 400 response] status: 400 } "

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/4c5e73ba-3a64-4ee3-a684-347cde368dd0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to make a call mcc test account when my Developer token not approved.

2015-09-24 Thread vikashverma
I'm getting Developer Token Not Approved in soap api response.
This is my soap api request in nodejs

var 
url='https://adwords.google.com/api/adwords/mcm/v201506/CustomerService?wsdl';
soap.createClient(url,function(err,client) {
  if (err) throw err;
  // console.log(client);
   client.addSoapHeader({RequestHeader: {
  developerToken: "MyDevToken", //Developer Token of my mcc production 
acc 
  userAgent: "X"
   }},"","ns1","https://adwords.google.com/api/adwords/mcm/v201506;);
   client.setSecurity(new soap.BearerSecurity(accessToken));
   client.get({},function(err,res){
  console.log(err);
  console.log(res);
   })

I'm getting this xml response as "Developer Token Not Approved"

http://schemas.xmlsoap.org/soap/envelope/;>https://adw
ords.google.com/api/adwords/cm/v201506" 
xmlns="https://adwords.google.com/api/adwords/mcm/v201506;>0005208bc933a020
0abcd4491f069f57CustomerServiceget0342soa
p:Server[QuotaCheckError.DEVELOPER_TOKEN_NOT_APPROVED 
@ ; trigger:\'null\']
https://adwords.google.com/api/adwords/mcm/v201506; 
xmlns:ns2="https://adwords.google.com/api/adwords/cm
/v201506">[QuotaCheckError.DEVELOPER_TOKEN_NOT_APPROVED @ ; 
trigger:\'null\']ApiExceptionhttp://www.w3.org/2001/XMLSchema-instance; xsi:typ
e="ns2:QuotaCheckError">nullQuotaCheckError.DEV
ELOPER_TOKEN_NOT_APPROVEDQuotaCheckErrorDEVELOPER_TOKEN_NOT_A
PPROVED


i know my developer token status is pending.but i dont know how to call mcc 
test account or how to link my production acc with my test acc.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/0a0a0d80-535c-45a9-9c12-da63b4b0acc3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.