https://github.com/login/oauth/authorize?client_id=*********&scope=user,public_repo  

登录成功后回调 带code.

 https://github.com/login/oauth/access_token?client_id=*********&client_secret=*******&code=*****
https://api.github.com/user?access_token=******&scope=public_repo%2Cuser&token_type=bearer
{
  "login": "ecdiy",
  "id": 559113,
  "node_id": "*****",
  "avatar_url": "https://avatars2.githubusercontent.com/u/559113?v=4",
  "gravatar_id": "",
  "url": "https://api.github.com/users/ecdiy",
  "html_url": "https://github.com/ecdiy",
  "followers_url": "https://api.github.com/users/ecdiy/followers",
  "following_url": "https://api.github.com/users/ecdiy/following{/other_user}",
  "gists_url": "https://api.github.com/users/ecdiy/gists{/gist_id}",
  "starred_url": "https://api.github.com/users/ecdiy/starred{/owner}{/repo}",
  "subscriptions_url": "https://api.github.com/users/ecdiy/subscriptions",
  "organizations_url": "https://api.github.com/users/ecdiy/orgs",
  "repos_url": "https://api.github.com/users/ecdiy/repos",
  "events_url": "https://api.github.com/users/ecdiy/events{/privacy}",
  "received_events_url": "https://api.github.com/users/ecdiy/received_events",
  "type": "User",
  "site_admin": false,
  "name": null,
  "company": null,
  "blog": "",
  "location": null,
  "email": null,
  "hireable": null,
  "bio": null,
  "public_repos": 6,
  "public_gists": 2,
  "followers": 2,
  "following": 0,
  "created_at": "2011-01-12T09:17:01Z",
  "updated_at": "2018-11-03T06:20:44Z",
  "private_gists": 0,
  "total_private_repos": 0,
  "owned_private_repos": 0,
  "disk_usage": 4230,
  "collaborators": 0,
  "two_factor_authentication": false,
  "plan": {
    "name": "free",
    "space": 976562499,
    "collaborators": 0,
    "private_repos": 0
  }
}
加入收藏 取消收藏 微博分享 43 次点击 1 回复
ecdiy 11-13 10:34 感谢回复者 1

我来自github :)
添加一条新回复
请尽量让自己的回复能够对别人有帮助
冀ICP备16008655号-3
返回顶端