Retreive the Oauth access token from the authorization code
traveler.oauth
.getAccessToken('code', 'oauthClientId', 'oauthClientSecret')
.then(response => {
console.log(response);
})
.catch(err => {
console.log(err);
});
The authorization code from the oauth redirect url
Use the refreshToken to retrieve a new valid access_token. Please keep the expiration durations in mind. This is only possible with a confidential app, as only this will get a refresh token to use
traveler.oauth
.refreshToken('refreshToken', 'oauthClientId', 'oauthClientSecret')
.then(response => {
console.log(response);
})
.catch(err => {
console.log(err);
});
The oauth client id
The oauth client secret key
Generates the OAuthURL where your users need to sign up to give your application access to authorized endpoints.
let url = traveler.oauth.generateOAuthURL('clientId');
Traveler