Skip to content

Slackbot unable to join private channel with conversations.join #1656

Description

@adrielklein

Description

Hello I am running into a problem that is preventing my slackbot from joining private channels (AKA groups).

So I made sure to add the groups:write scope upon initializing the app, but for whatever reason when i call conversations.join I am faced with the following error:

method_not_supported_for_channel_type

I would have assumed that since I contain the proper scope, then my app should be able to join the private channel. Any suggestions on how to successfully join the private channel? Am I perhaps missing another scope?

Here's some of my code for reference:

const expressReceiver = new ExpressReceiver({
  processBeforeResponse: true,
  signingSecret: process.env.SLACK_SIGNING_SECRET,
  clientId: process.env.SLACK_CLIENT_ID,
  clientSecret: process.env.SLACK_CLIENT_SECRET,
  stateSecret: "my-secret",
  scopes: [
    "chat:write",
    "commands",
    "channels:join",
    "reactions:write",
    "groups:write",
  ],
  installationStore: {
    ...
  },
});

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • example code related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

Bug Report

Reproducible in:

package version:

{
  "name": "party-poll-v2",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "dependencies": {
    "@slack/bolt": "^3.12.1",
    "@slack/oauth": "^2.5.4",
    "@vendia/serverless-express": "^4.10.1",
    "axios": "^1.1.3",
    "querystring": "^0.2.1"
  },
  "devDependencies": {
    "serverless-dotenv-plugin": "^4.0.2",
    "serverless-offline": "^10.0.2"
  }
}

node version:
v14.20.1
OS version(s):
macOS Big Sur 11.6.8 (20G730)

Steps to reproduce:

  1. To to slackbot website
  2. Select "Add to Slack"
  3. Authorize
  4. Try running a party poll command, i.e. /partypoll "What is your favorite color?" red blue green in a private channel

Expected result:

User sees slackbot respond and post a poll as a message to the channel

Actual result:

User's command disappears. User sees message /partypoll failed with the error "dispatch_failed"

Express server fails with the following error:

{
  code: "slack_webapi_platform_error",
  data: {
    ok: false,
    error: "method_not_supported_for_channel_type",
    response_metadata: {
      scopes: [
        "chat:write",
        "commands",
        "channels:join",
        "reactions:write",
        "groups:write",
      ],
      acceptedScopes: ["channels:join"],
    },
  },
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionM-T: User needs support to use the project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions