The discussion revolves around modifying a user’s email address via API calls. paully21 is seeking help to achieve this, referencing the UsersEmailController endpoint.
Falco and zogstrip suggest using the PUT https://your.discourse.org/users/<username>/preferences/email endpoint with an email parameter.
After implementing this solution, paully21 receives a 200 OK response but notes that the email address is not updated. Falco clarifies that a confirmation email is sent, requiring user verification.
paully21 realizes that the solution works but asks if it’s possible to bypass the confirmation step. Falco advises against it, emphasizing the importance of confirmations in preventing typos.
Ultimately, paully21 expresses gratitude for the help received.
We have a section on our website that allows users to manage their Discourse account preferences. Most of our users only use Discourse as a sort of mailing list, so we made it easy for them to manage that activity within their website account.
I need to be able to modify the user’s email address via an api call. We do all sorts of stuff with api calls now, but I can’t figure out how to change the email address.