Skip to content

Instantly share code, notes, and snippets.

@kevinSuttle
Last active June 17, 2022 12:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinSuttle/bd0cdcdfb798b129bffc to your computer and use it in GitHub Desktop.
Save kevinSuttle/bd0cdcdfb798b129bffc to your computer and use it in GitHub Desktop.
User emails API
❯ curl -H "Authorization: token MY_TOKEN" -H "X-Oauth-Scope: user:email" "https://api.github.com/users/kevinSuttle"
{
"login": "kevinSuttle",
"id": 95672,
"avatar_url": "https://avatars.githubusercontent.com/u/95672?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/kevinSuttle",
"html_url": "https://github.com/kevinSuttle",
"followers_url": "https://api.github.com/users/kevinSuttle/followers",
"following_url": "https://api.github.com/users/kevinSuttle/following{/other_user}",
"gists_url": "https://api.github.com/users/kevinSuttle/gists{/gist_id}",
"starred_url": "https://api.github.com/users/kevinSuttle/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kevinSuttle/subscriptions",
"organizations_url": "https://api.github.com/users/kevinSuttle/orgs",
"repos_url": "https://api.github.com/users/kevinSuttle/repos",
"events_url": "https://api.github.com/users/kevinSuttle/events{/privacy}",
"received_events_url": "https://api.github.com/users/kevinSuttle/received_events",
"type": "User",
"site_admin": false,
"name": "Kevin Suttle",
"company": "IBM",
"blog": "http://kevinsuttle.com",
"location": "Austin, Texas",
"email": "kevin@suttle.email",
"hireable": false,
"bio": null,
"public_repos": 67,
"public_gists": 26,
"followers": 80,
"following": 44,
"created_at": "2009-06-15T21:04:08Z",
"updated_at": "2015-06-12T17:10:19Z"
}
❯ curl -H "Authorization: token MY_TOKEN" -H "X-Oauth-Scope: user:email" "https://api.github.com/users/kevinSuttle/emails"
{
"message": "Not Found",
"documentation_url": "https://developer.github.com/v3"
}
❯ curl -H "Authorization: token MY_TOKEN" -H "X-Oauth-Scope: user:email" "https://api.github.com/user/kevinSuttle/emails"
{
"message": "Not Found",
"documentation_url": "https://developer.github.com/v3"
}
❯ curl -H "Authorization: token 3504fb1f513263532c35ad058d24599525c4b448" -H "X-Oauth-Scope: user:email" "https://api.github.com/kevinSuttle/emails"
{
"message": "Not Found",
"documentation_url": "https://developer.github.com/v3"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment