Hi,
I’m using a Gitlab OAuth app to authenticate users and then calling APIs to get information about members/users within a group. I’m having trouble accessing the email addresses or at least the public email addresses of users. I get 403 forbidden when I try to access email addresses of other users and an empty array when I try to access the email addresses of the authenticated user.
curl --header “PRIVATE-TOKEN: ***************” “https://gitlab.com/api/v4/users/6025455/emails”
curl --header “PRIVATE-TOKEN: ***************” “https://gitlab.com/api/v4/users/emails”
curl --header “Authorization: Bearer *********************************************” “https://gitlab.com/api/v4/user/emails”
curl --header “Authorization: Bearer *********************************************” “https://gitlab.com/api/v4/users/6025455/emails”
I understand that the /users/:id/emails API is restricted to admins. Is this admin the admin of a group? Or an admin of the self-managed Gitlab instance?
But in any case, is it possible to get public email address of a user that is a member of your group? Any help will be much appreciated. Thank you in advance.