Getting user email

Hi

Is there a way to get the users for a specific role and for those users getting the associated email address ?
Could be useful to trigger email notification when content are published (without having to set up several users repositories)

Thanks

Jerome

Hi Jérôme,

The short answer to this is no.

The API currently doesn’t provide any endpoint giving user details (inc. email).
The only endpoint going in that direction is /users/me.
Am I right assuming that supporting /users/{user_id} would be what you’re looking for, so that you could use the space membership collection endpoint to fetch all users of a given role, and then fetch these users’ emails?

In the meantime, a way to achieve this would be to keep tabs on people who need to receive a notification separately in a configuration file (or else), accessible from a Web Hook implementation which would handle sending the notification.

Thank you,
Hervé

Hi @herve

Thanks for the answer.
This is exactly what we would need.

Regards
Jerome