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

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

报告相同问题?

悬赏问题

  • ¥15 MapReduce实现倒排索引失败
  • ¥15 luckysheet
  • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
  • ¥15 找一位技术过硬的游戏pj程序员
  • ¥15 matlab生成电测深三层曲线模型代码
  • ¥50 随机森林与房贷信用风险模型
  • ¥50 buildozer打包kivy app失败
  • ¥30 在vs2022里运行python代码
  • ¥15 不同尺寸货物如何寻找合适的包装箱型谱
  • ¥15 求解 yolo算法问题