Get user email, emails.json seems not working


(Borgy Manotoy) #1

Hi, I am looking for a way to get the user email address.

Link for getting the user info:

https://meta.discourse.org/u/USERNAME.json

but it does not contain the email address.

I read from a post:

Getting user email link:
https://meta.discourse.org/u/USERNAME/emails.json

but I am always getting the response:
{“failed”:“FAILED”}

Eventhough I am already logged in to Discourse.
If it needs an api_key or something… where can I get it? I am thinking I do not have enough access/permission to do this… or I may be missing something here.

I would really want to extract the email address.

Thanks!


(Jeff Atwood) #2

Looking at someone’s email is a protected action and will require a staff API key.