# Is it possible to pass anonymize\_ip parameter via http api call to /admin/users/{id}/anonymize method?

**URL:** https://meta.discourse.org/t/is-it-possible-to-pass-anonymize-ip-parameter-via-http-api-call-to-admin-users-id-anonymize-method/276051
**Category:** Development
**Tags:** rest-api, anonymization
**Created:** [July 10, 2019, 10:25am UTC](https://meta.discourse.org/t/is-it-possible-to-pass-anonymize-ip-parameter-via-http-api-call-to-admin-users-id-anonymize-method/276051 "2019-07-10T10:25:04Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Yevhenii\_Baraniuk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/yevhenii_baraniuk/32/148388_2.png) [@Yevhenii\_Baraniuk](https://meta.discourse.org/u/Yevhenii_Baraniuk)
#### Post date: [July 10, 2019, 10:25am UTC](https://meta.discourse.org/t/is-it-possible-to-pass-anonymize-ip-parameter-via-http-api-call-to-admin-users-id-anonymize-method/276051/1 "2019-07-10T10:25:04Z")

</div>

> [@Anonymizing Users in Discourse](https://meta.discourse.org/t/anonymizing-users-in-discourse/86929/1):
>
> Discourse will retain the user’s IP addresses in our logs associated with the anonymous user. However, there is a new mechanism to clear those out too available to developers.
> 
> When using our `UserAnonymizer` class, you [can pass in an :anonymize\_ip](https://github.com/discourse/discourse/blob/05dddcb2fd1756b31d50648a8a4ea5b7b50b6f1d/app/services/user_anonymizer.rb#L33) option with an IP to replace, for example `0.0.0.0` .

Is it possible to pass `anonymize_ip` parameter via http api call to `/admin/users/{id}/anonymize` method?

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [July 10, 2019, 8:42pm UTC](https://meta.discourse.org/t/is-it-possible-to-pass-anonymize-ip-parameter-via-http-api-call-to-admin-users-id-anonymize-method/276051/2 "2019-07-10T20:42:12Z")

</div>

It is currently not possible, as this was considered a power feature that should be approached with caution.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [August 21, 2023, 3:17pm UTC](https://meta.discourse.org/t/is-it-possible-to-pass-anonymize-ip-parameter-via-http-api-call-to-admin-users-id-anonymize-method/276051/3 "2023-08-21T15:17:47Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
