Hoss
Hoss

Reputation: 952

How to fix messages_tab_disabled error in Slack's chat.postMessage API?

I'm trying to post a direct message to a specific Slack user. I'm using chat.postMethod method. The below example works fine when channel is a channel ID. But when I change it to a users ID (as described in this documentation), I get back a messages_tab_disabled error.

POST URL: https://slack.com/api/chat.postMessage

{
  "channel": "U02F7EXXXXX",
  "blocks": [
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "Hello"
      }
    }
  ]
}

I get back...

{
  "ok": false,
  "error": "messages_tab_disabled"
}

I can't find much on this other than a description on the documentation page that just says "Messages tab for the app is disabled.".

Where is it and how do I enable it?

Upvotes: 10

Views: 2747

Answers (1)

Hoss
Hoss

Reputation: 952

I stumbled upon how to fix this when I was poking around settings for my app. In case this helps anyone else in the future...

In your apps configuration page, under Features > App Home, scroll down to the Show Tabs section and there is an option called Messages Tab that is off by default. I turned it on and now I can message users directly.

Upvotes: 18

Related Questions