I am making a HTTP GET Request to the googleapi page to return information regarding my adsense account. When I do this, I send a header of Authorization: Bearer ACCESSTOKEN
but the Access Token is only valid for 1 hour. How would I get a new Access Token the next time I run my script without using the browser?

Google API:每次运行时获取刷新/访问令牌
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
1条回答 默认 最新
- dongyejun1983 2017-06-19 19:04关注
When you are saving access token, save refresh token too (in authorization code exchange)
then, use refresh token to get new access token after 1 hour
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报