[GraphQL] Access to user emails API


API v3 offers the ability to retrieve all user email addresses via https://developer.github.com/v3/users/emails/

I don’t see any way to do this in API v4. Any hint?




Hi @jd1,

Thanks for being here! For now, you have the ability to query for a user by email address or username.

user(usernameOrEmail: "foo@bar.com") {

Thanks Andrea, but that does not help me at all.

I don’t have the email addresses of the user. I want to *retrieve* them *all*.


wanted to bump this, I’m having a similar issue.  Once I OAUTH a user want to ensure that they are a registered user in the system so they can onboard.  

Saw plenty of stackoverflow posts on using v3 as original poster mentioned.  But not seeing anything in the graphql reference to retrieve the viewers email addresses.


I also need the same thing as @jd. Since developers usually have their own personal email as primary in their accounts, it’s hard to identity the employee by Github login or personal email.

(1) Is it still not possible to get all emails associated with the account?

(2) When I try to get user by this usernameOrEmail I get the message: Field 'user' doesn't accept argument 'usernameOrEmail'. Am I missing something?

1 Like