I want to get the refresh token from the google Api's but i don't know how i can get this Please anyone can tell me

0 Answer
Check this answer on getting Google Refresh Token or check the official documentation on Google Api
oauth2Client.on('tokens', (tokens) => {
if (tokens.refresh_token) {
// store the refresh_token in my database!
console.log(tokens.refresh_token);
}
console.log(tokens.access_token);
});
To set the refresh_token at a later time, you can use the setCredentials method:
oauth2Client.setCredentials({
refresh_token: `STORED_REFRESH_TOKEN`
});
Once the client has a refresh token, access tokens will be acquired and refreshed automatically in the next call to the API.
You should also know that The refresh_token is only returned on the first authorization.
这家伙很懒,什么都没留下...