0.0.2 • Published 4 years ago
auth1 v0.0.2
Auth1 Nodejs SDK
USAGE
const Auth1 = require('auth1')
const auth1 = new Auth1({
clientId: "xxx",
clientSecret: "yyy"
})
auth1.getAccessToken().then(data=>{
console.log('data',data);
// data.access_token = 'xxx'
// data.expires_in = 21234
// data.type = "Bearer"
}).catch(e=>{
console.log('error',e);
})
auth1.getConnectionAccessToken({
connectionId: 'joeCJ_s9JIfDkT6sWUHHx'
}).then(data=>{
console.log('data',data);
// data.access_token
// data.expires_at
})