Hi Rasmus,

That's a pretty useful script. I've heard a few users asking for one, but 
it's the first time I'm seeing a user write one and contribute to the 
community. Thanks a lot! One of my colleagues was experimenting with 
AdWords API on Node.js, I'll ask him to take a look and reach out to you.

I have a couple of suggestions: 


   - It is useful to have a --customerId flag that reads from config if one 
   is not provided on the command line. That way, one could switch customer 
   ids on command line w/o changing the config.
   - You should try to use OAuth2 as authentication mechanism, since 
   ClientLogin protocol is deprecated and will go away in the next 6 months. 
   The rough steps to generate one using OAuth 2.0 Playground would be as 
   follows (I apologize, I don't have a handy guide to point you to in our 
   documentation site):
      - Visit Google Cloud Console. 
      https://cloud.google.com/console#/project
      - Create a new project, then register a *web* application. 
      Provide https://developers.google.com/oauthplayground a callback url. 
This 
      will give you an OAuth2 *clientId *and *clientSecret*.
      - Visit https://developers.google.com/oauthplayground/. Click the 
      OAuth2.0 configuration button on the top right corner, and check "Use 
your 
      own OAuth credentials". Add the OAuth2 clientId and clientSecret from the 
      Google cloud console on this page, and Save.
      - Do the OAuth2 flow on the main application, for scope = 
*https://adwords.google.com/api/adwords. 
      *At the end of the flow, the page will print out a refresh token and 
      an access token.
      - In your application, you need to send the authorization header as 
*Authorization: 
      Bearer access_token* instead of Authorization GoogleLogin...
      - Access tokens will expire in an hour, but you could use the refresh 
      token to get a new access token. The raw http message for the same is 
      available 
      here: https://developers.google.com/accounts/docs/OAuth2WebServer#refresh
   
Cheers,
Anash P. Oommen,
AdWords API Advisor.

On Monday, December 16, 2013 6:45:06 PM UTC-5, Rasmus Ladekjær Pedersen 
wrote:
>
> I wrote this little node.js script to retrieve report from Google AdWords. 
> When I myself was new to the API I would really have liked a simple script 
> like that, and that is why I later wrote it and now post it here.
>
> https://github.com/ladekjaer/node-gawr
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to