# Unblock user automatically

**URL:** <https://community.auth0.com/t/unblock-user-automatically/106070>\
**Category:** Get Help\
**Tags:** suspicious-ip-throttling, attack-protection\
**Created:** [May 3, 2023, 12:43pm UTC](https://community.auth0.com/t/unblock-user-automatically/106070 "2023-05-03T12:43:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeanbaptiste.marie](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@jeanbaptiste.marie](https://community.auth0.com/u/jeanbaptiste.marie)\
**Post date:** [May 3, 2023, 12:43pm UTC](https://community.auth0.com/t/unblock-user-automatically/106070/1 "2023-05-03T12:43:19Z")

</div>

Hello,

I am looking for the best way to unblock automatically a blocked user account. Indeed a user might be blocked after several login attempts that failed. There is an API that can be used to unblock the user programmatically, but how can I check the duration from when the user was blocked? What is the best way to implement it? Can it be done into an Action? Will the Login flow be reached when a user is blocked?

Thanks in advance for your help,

Regards

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [May 3, 2023, 6:29pm UTC](https://community.auth0.com/t/unblock-user-automatically/106070/3 "2023-05-03T18:29:22Z")

</div>

Hi @jeanbaptiste.marie,

Thanks for reaching out to the Auth0 Community!

> [@jeanbaptiste.marie](#):
>
> There is an API that can be used to unblock the user programmatically, but how can I check the duration from when the user was blocked? What is the best way to implement it? Can it be done into an Action? Will the Login flow be reached when a user is blocked?

Unfortunately, it is not possible to unblock a user automatically. Whenever a user is blocked, they are sent a blocked account email which they can unblock themselves by clicking on a link.

For now, you can unblock a user programmatically by calling the Management API’s [Unblock a user](https://auth0.com/docs/api/management/v2#!/User_Blocks/delete_user_blocks_by_id) endpoint, as you have found.

Let me also add that you could check when the user is blocked by checking your Logs and filtering for `limit_wc` [Log event type code.](https://auth0.com/docs/deploy-monitor/logs/log-event-type-codes#:~:text=.-,limit_wc,-Blocked%20Account)

Does that help?

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![jeanbaptiste.marie](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@jeanbaptiste.marie](https://community.auth0.com/u/jeanbaptiste.marie)\
**Post date:** [May 5, 2023, 9:46am UTC](https://community.auth0.com/t/unblock-user-automatically/106070/4 "2023-05-05T09:46:04Z")

</div>

Thanks @rueben.tiow. It is not the most straightforward solution but it will work.  
Regards,

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [May 19, 2023, 9:46am UTC](https://community.auth0.com/t/unblock-user-automatically/106070/5 "2023-05-19T09:46:40Z")

</div>

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