首页 > 代码库 > google api , using a refresh token to get the access token

google api , using a refresh token to get the access token

 

router.get(‘/refresh‘,function(req,res){  oauth2Client.credentials = { refresh_token: ‘1/RqVyL7yLBxwsCA4h5IzDJuMVcCwX3munQz1ntGyg99I‘};  oauth2Client.refreshAccessToken(function(err, tokens){    res.send({      access_token: tokens.access_token,      token:tokens    });  });});

 

google api , using a refresh token to get the access token