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)