Active user after changing email

Hi there,

I am using discourse API to change email of the user with master API key.

API address something like : /users/:username/preferences/email.json

In parameters I am passing new-email, api_key, and api_username. It returns me null as a response and sending confirmation email on new email.

I want active user directly here anyone has good suggestion to complete this process.

There is an option to activate a user account in the admin backend, without the user needing to click a link received by e-mail. I just had a look what API function that uses, and it turns out to be this HTTP request:

PUT https://example.com/admin/users/123/activate

Where you’d replace 123 with the user ID of the user in question, of course.

2 Likes