前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Github登录使用oAuth 2.0的更改API通知

Github登录使用oAuth 2.0的更改API通知

作者头像
KEVINGUO_CN
发布2020-03-16 10:15:56
1K0
发布2020-03-16 10:15:56
举报
文章被收录于专栏:全栈全栈全栈全栈

 On February 18th, 2020 at 03:24 (UTC) your application (********) used an access token **********) as part of a query parameter to access an endpoint through the GitHub API:

https://api.github.com/user Please use the Authorization HTTP header instead as using the `access_token` query parameter is deprecated. Depending on your API usage, we'll be sending you this email reminder on a monthly basis. Visit https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param for more information about suggested workarounds and removal dates. Thanks, The GitHub Team  

根据最新的github api 如果使用GitHub登录获取authenticatied 的API 已经更换,不能使用原来的url 而需要自定义的github Header来登录。

因此,python 获取User 的API应当更改为

headers = {"token":"token {}".format(access_token)} requests.get(url=userurl,headers=headers)

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2020-02-18,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档