How to fetch email address in confluence server?

I need to fetch email address using confluence server REST API.
I tried this rest/api/user?username=admin&expand=details.personal,details.business but it doesn’t return email address in response.

Can anyone help with any workaround for fetching email address?

Hi @VivekGupta

please try this non public api

rest/mobile/1.0/profile/<USERNAME>

Cheers
Adam

HI @adam.labus

this api doesn’t work in all scenarios. In my scenarios i am getting 404. But user exist. And in some cases i am also getting 403. What is meant by 403 and how to resolve it?

Do we need admin or system admin permission to access above api?? if i am setting oauth2 scope??