Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting API error occurred: account_inactive when using Slack Postmessage api to send message to slack user

I am building a slack app that would send messages to user. Recently I am getting an error which says "account_inactive". The slack documentation describes the following error as below

Authentication token is for a deleted user or workspace when using a bot token.

I tried sending a message to a deactivated slack user using "chat.postMessage" using a bot token "xoxb-token" and the API returns success all the time. It would be great if anyone can help me with what causes this error.

PS: I am not using BoltJS, I am using he JS SDK directly.

like image 319
Keshav S Avatar asked Nov 29 '25 19:11

Keshav S


2 Answers

Sounds like your app has been uninstalled from the workspace. You can try calling auth.test to see if the token is still valid.

like image 135
Colm Doyle Avatar answered Dec 02 '25 09:12

Colm Doyle


I've come across this error recently.

In my case, the cause was that when a user account is deactivated, some apps they've installed are also deactivated. If this is the case for you, a member with the permission to manage apps will need to reactivate it.

More information can be found in this Slack help article.

like image 34
Jaffar Rizvi Avatar answered Dec 02 '25 10:12

Jaffar Rizvi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!