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

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.

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.

1 Like

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

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.

3 Likes

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

regards
shahid

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

2 Likes