The discussion revolves around retrieving community email addresses via API endpoint. dgallegos is looking for an endpoint to retrieve email addresses associated with his organization’s community, but only his own email address is returned. Philip_Colmer and Philip_Colmer face the same issue and discover that the API has changed, and email addresses are no longer exposed.
j127 tries to find alternative solutions, referring to outdated documentation, but eventually j127 discovers a working endpoint: f"{BASE_URL}/u/{username}/emails.json" to programmatically retrieve email addresses from usernames.
I was hoping somebody can point me to where I can set my endpoint to retrieve via API callout users email addresses associate with my organizations specific community.
I can hit the end point of active users, new users and others; however, the associated email does not return for any other user other than my account.
I’m seeing the same problem with the users/list API call. The email addresses are not being returned, and I’m using an API key generated for the system user, which should be all-powerful?
The API documentation definitely says that “email” should be non-empty.
Does anyone know the current status on looking up email addresses with the API? (The linked page doesn’t exist.)
The API docs say that emailshould be returned from /admin/users/{id}.json, but it’s missing when I make requests there.
I have a list of Discourse usernames, and I’m trying to get their email addresses to match them with their email addresses in another system.
# I'm getting the user ID from here:
f"{BASE_URL}/u/{username}.json"
# and then trying to fetch the email address from here:
f"{BASE_URL}/admin/users/{user_id}.json"
If email isn’t available there any more, is there another way to programmatically get it from the username?