Search code examples
slack-api

slack api files.upload error: not_in_channel


trying to upload a file from a build server following the doc: https://api.slack.com/methods/files.upload

And also using bot token: https://api.slack.com/authentication/basics

I am getting the error: {"ok":false,"error":"not_in_channel"}

Appreciate any help and pointers!


Solution

  • This error occurs when a bot oauth token is used and the bot isn't in the target channel(s).

    To fix:

    • Go into target channel(s)
    • Type /invite @BOT_NAME
    • Retry the request