doujia1871 2017-06-19 19:00
浏览 74
已采纳

Google API:每次运行时获取刷新/访问令牌

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?

  • 写回答

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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?