2

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.

Keshav S
  • 33
  • 5
  • I think the message is in regards to your app's authentication token, not the user you're trying to send to – Phil Jul 07 '22 at 04:34
  • @Phil By app's authentication token, do you mean signing secret and client secret? If yes, I checked the signing secret, client secret and client id, all the values seem to be correct. – Keshav S Jul 07 '22 at 07:35
  • He is talking about the "xoxb-token", you need to reinstall the app, it will let you know if there are any errors with the token. – Suyash Gaur Jul 07 '22 at 07:49

2 Answers2

3

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

Colm Doyle
  • 3,598
  • 1
  • 20
  • 22
  • This helps. I tried uninstalling the app and tried out auth.test api and got the same error. Is there any other scenario apart from the app being uninstalled, where I could get the same error? – Keshav S Jul 08 '22 at 06:03
1

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.

Jaffar Rizvi
  • 71
  • 1
  • 1
  • 8