Use API to get mail address for given username


I want to hack a script that routes incoming mails from the server to the private mail accounts of the association members. I assume that all members have a forum account and want to reuse the already approved mail address from the forum db.

I checked the data that is returned from the forum API for a given username, but I cannot find the mail address. How do I get it?

Have you tried to PUT /users/<username>/emails.json?

1 Like

I tried and I just get a html page saying content would not exist or is private. I used the api key generated for all users and the api_user system or the username of my admin account.

I edited my previous post. This route uses the PUT verb but shouldn’t :frowning: Will fix.

I was studying the file but did not realised that it was PUT. Now it works. :slight_smile:


There you go :ear_of_rice:


The point of that being non-GET is that it causes a staff action log, so it shouldn’t be triggereable from an img or an idempotent request retry thing.