# Active user after changing email

**URL:** <https://meta.discourse.org/t/active-user-after-changing-email/65719>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [2017年七月6日 08:17 UTC](https://meta.discourse.org/t/active-user-after-changing-email/65719 "2017-07-06T08:17:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gautampatadiya](https://avatars.discourse-cdn.com/v4/letter/g/e8c25b/32.png) [@gautampatadiya](https://meta.discourse.org/u/gautampatadiya)\
**Post date:** [2017年七月6日 08:17 UTC](https://meta.discourse.org/t/active-user-after-changing-email/65719/1 "2017-07-06T08:17:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tanius](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tanius/32/135041_2.png) [@tanius](https://meta.discourse.org/u/tanius)\
**Post date:** [2019年三月29日 20:51 UTC](https://meta.discourse.org/t/active-user-after-changing-email/65719/2 "2019-03-29T20:51:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [2022年五月31日 10:59 UTC](https://meta.discourse.org/t/active-user-after-changing-email/65719/4 "2022-05-31T10:59:18Z")

</div>


