Change Users email address using the API without sending the confirmation Email


#1

I am a new discourse user and I ran into a use case where I have to update the user email address using the API. Discourse is sending out an email to the new email address for verification. Is there a way to update the user email address without sending the confirmation email?

I tired another approach where I first deactivate the user, update the email and activate the user as suggested in other posts but the user is still getting the confirmation email. The user account is only getting updated after the link in the confirmation email is clicked. I want to do this without the confirmation email.

Any help on this is appreciated. Thanks.


(Simon Cossar) #2

If you are using SSO you can update the email address through the /admin/users/sync_sso route. When it’s done that way a confirmation email isn’t sent.


#3

I am not using SSO, Is using SSO the only option?


(Simon Cossar) #4

I did some quick tests with this a few weeks ago. The sync_sso method was the only way I could find to do it that wouldn’t require the user to click on a confirmation email.


(shahid) #5

is there a Java SDK to carry out the sync_sso in a java application?

regards
shahid


(Sam Saffron) #6

sync_sso uses the exact same payload as SSO does, so use whatever code you have for your server side.