Skip to content

Gets access and refresh tokens to use with Google AdWords API.

Notifications You must be signed in to change notification settings

ladekjaer/adwords-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

adwords-auth

Module to obtaing access and refresh tokens to use with Google AdWords API.

###Usage First get module via npm

$ npm install adwords-auth

Get both the refresh and the access token (redirectUri could be e.g. http://localhost:3000):

var auth = require('adwords-auth');
auth.getTokens(clientId, clientSecret, redirectUri, function(err, tokens) {
    if (err) throw err;
    console.log(tokens);
});

Get a new access token

var auth = require('adwords-auth');
auth.refresh(clientId, clientSecret, refreshToken, function(err, token) {
    if (err) throw err;
    console.log(token);
});

###License

MIT

About

Gets access and refresh tokens to use with Google AdWords API.

Resources

Stars

Watchers

Forks

Packages

No packages published