Google apis explorer 我们如何延长Google API访问令牌的持续时间?

Google apis explorer 我们如何延长Google API访问令牌的持续时间?,google-apis-explorer,google-api-nodejs-client,Google Apis Explorer,Google Api Nodejs Client,代码 这是我们的代码: const auth=new google.auth.GoogleAuth({ 密钥文件:'/path/to/key.json', 范围:['https://www.googleapis.com/auth/analytics.readonly'], }) ... var accessToken=wait auth.getAccessToken() .catch(错误=>{ 控制台错误(错误) 返回空 }) 故障 代币将在30分钟内到期 我们希望生成至少在2天后过期的代币

代码

这是我们的代码:

const auth=new google.auth.GoogleAuth({
密钥文件:'/path/to/key.json',
范围:['https://www.googleapis.com/auth/analytics.readonly'],
})
...
var accessToken=wait auth.getAccessToken()
.catch(错误=>{
控制台错误(错误)
返回空
})
故障

代币将在30分钟内到期

我们希望生成至少在2天后过期的代币