Hi Experts,
Need your help in an API request to get user email address using accountId.
User set email visibility to private for his account.
Using this api : https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-user-get
emailAddress parameter is empty. please suggest a way to get user email address
I am able to figure out the solution. Using this below API we can get email Address of a user, even if user set email visibility to Private. curl --location 'https://api.atlassian.com/admin/v1/orgs/{{ordID}}/users/search' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer TOKEN' \--data '{"accountIds": ["accountID"],"expand": ["NAME", "EMAIL"]}'
https://jira.atlassian.com/browse/ID-8222
Hi @Vikrant Yadav
If you follow that REST API endpoint's linked content, it indicates an app would need additional Atlassian review / approval to do this...along with several caveats and restrictions.
If that does not match your scenario needs, you could try using the mention capabilities with the account ID and a selected work item, although that relies upon the person having notifications enabled.
Kind regards,Bill
Hi @Bill Sheboy This API is giving email address for other users but for a single user only it's not showing user emaail via API. Due to User personal settings, user make it's email address Private that's why not visible via Get user.API
But as Admin there should be an API which give user email address even if user set email visiblity to private.
I agree, and I am glad to learn you found a new endpoint to find the information.
It looks like you're new here. Sign in or register to get started.