Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
jd
Copilot Lvl 2
Message 1 of 4

[GraphQL] Access to user emails API

Hey,

 

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?

 

Best,

 

jd

3 Replies
Community Manager
Message 2 of 4

Re: [GraphQL] Access to user emails API

Hi @jd,

 

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 for being here, sharing, and keeping our community awesome!
Best,
AndreaG

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!

jd
Copilot Lvl 2
Message 3 of 4

Re: [GraphQL] Access to user emails API

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*.

Copilot Lvl 2
Message 4 of 4

Re: [GraphQL] Access to user emails API

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.