Slack bot fails to send message to restricted general channel via chat.postMessage

No. You are not missing any scopes. Its just that the user you used to auth your app can not post into the general channel. Apparently admins have restricted who can post messages in that channel, e.g. to admins only.

Either use a user that has posting rights for that channel to auth your app or switch to a different channel for your testing.


Bots are not full members so I had to use user token

xoxp-token

to post to chat.postmessage, with

as_user:false

and had to add a missing_scope that is

chat:write:user

And then I was able to make this work correctly. Credit goes to @girliemac for helping out on this one.

https://github.com/slackapi/template-announcement-approvals/issues/6

Thanks