API call to unmask all emails


(Geoffrey Challen) #1

In the web interface there is an option for administrators to unmask all emails when examining the active user list. I don’t think that there is an API equivalent, although it would be useful. We have a case where we need to use email addresses as keys to synchronize our user list, and having to unmask each email one at a time generates enough API calls to (quickly) hit the built-in rate limiting.

Apologies if I missed this in the API documentation.


(Régis Hanol) #2

While it’s probably not in the API documentation (I haven’t checked), you can open your browser’s console and see the request made when clicking the unmask button as admin.

Then you’ll be able to use that same query in your code :wink:


(Jay Pfaffman) #3

Here’s the documentation: How to reverse engineer the Discourse API.


(Geoffrey Challen) #4

Thanks so much guys! It’s working perfectly now.

FWIW, I was passing show_emails=1 as part of the query string, when what was needed was show_emails=true. Perhaps working with JavaScript has spoiled me WRT truthy values, but it would be nice the API was a bit more forgiving :slight_smile:.