# Webhooks for user deletion/deactivation?

**URL:** https://meta.discourse.org/t/webhooks-for-user-deletion-deactivation/92496
**Category:** Development
**Created:** [July 16, 2018, 9:20pm UTC](https://meta.discourse.org/t/webhooks-for-user-deletion-deactivation/92496 "2018-07-16T21:20:03Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![j127](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j127/32/79093_2.png) [@j127](https://meta.discourse.org/u/j127)
#### Post date: [July 16, 2018, 9:20pm UTC](https://meta.discourse.org/t/webhooks-for-user-deletion-deactivation/92496/1 "2018-07-16T21:20:03Z")

</div>

Is there an easy way to add webhooks for user deletion and deactivation?

I think I’ve found [the relevant code](https://github.com/discourse/discourse/blob/467d91347a7e5c42b68ef2d963863ddaddbb12b1/config/initializers/012-web_hook_events.rb#L38) but it appears to only list webhooks for these actions:

```plaintext
user_logged_out
user_created
user_logged_in
user_approved
user_updated

```

We’re integrating separate applications that get updated with user data each time the Discourse user changes, so I’m looking for a way to remove users’ access from the other systems when the user accounts are deactivated/deleted from Discourse.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [July 16, 2018, 10:48pm UTC](https://meta.discourse.org/t/webhooks-for-user-deletion-deactivation/92496/2 "2018-07-16T22:48:16Z")

</div>

Sure not a bad idea to put this on someone’s to-do list .. maybe @vinothkannans? If it is easy we can just knock it out.

---

<div class="post-metadata">

### Author: ![j127](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j127/32/79093_2.png) [@j127](https://meta.discourse.org/u/j127)
#### Post date: [July 18, 2018, 12:49am UTC](https://meta.discourse.org/t/webhooks-for-user-deletion-deactivation/92496/4 "2018-07-18T00:49:05Z")

</div>

Thanks, that would be great, if it’s possible.

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [July 20, 2018, 7:00am UTC](https://meta.discourse.org/t/webhooks-for-user-deletion-deactivation/92496/5 "2018-07-20T07:00:58Z")

</div>

PR created:

[https://github.com/discourse/discourse/pull/6124](https://github.com/discourse/discourse/pull/6124)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [July 24, 2018, 1:00am UTC](https://meta.discourse.org/t/webhooks-for-user-deletion-deactivation/92496/6 "2018-07-24T01:00:03Z")

</div>

This topic was automatically closed after 3 days. New replies are no longer allowed.
