Search code examples
iosswift3slackslack-api

Error when trying to join a channel via API


im using slack to make chat bot so i can create a message center from my ios app to send message from ios app to slack. getting following response from hitting joinChannel api https://slack.com/api/channels.join cant get channel ids

{
  "provided" : "admin,identify,chat:write:bot",
  "ok" : false,
  "needed" : "channels:write",
  "error" : "missing_scope"
}

Solution

  • As the error message says you need the channels.write scope to use channels.join method.

    Just add the missing scope to your access token and it will work.