No email field in HUB REST API response


I'm trying to use JB Hub as oAuth2 identity provider for my standalone GitLab instance. I'm using the /api/rest/users/me endpoint to get current user's profile data authenticated via generated oauth token, and this works fine.

I get name, login and id parameters needed, however I'm unable to get the email parameter. I managed to get $ parameter, however this does not satisfy GitLab requirements, as it requires the email parameter to be at the same level as both name and login. Furthermore, I'm unable to find documentation for this endpoint so I'm looking in the dark a bit.

Is there a way to get the email parameter using this endpoint? Or is there any other endpoint that can provide me with all the required information? I was following this guide, but it seems a bit dated now and some things must have changed since it was released:


1 comment
Official comment


I'm Sergey from the Youtrack team.

I've already replied to you via a support ticket but will post the answer here as well in case someone else will face a similar issue. 


Please try using <Hub URL>/api/rest/oauth2/userinfo instead. It returns both email and email verification status which should be what you are looking for.

Please sign in to leave a comment.