I follow Slack bot post message documents
it works perfectly when post to public channel, but get error [error] => channel_not_found
when post to private channel, I even change channel_name to channel ID (ex: G1HCG4BQ9
)
I already authorized with both chat:write:user
and chat:write:bot
permissions
Did you invite the bot to the channel? A bot can't post in a private channel if it's not a member - you need to invite it to the channel like you would a person.
@YourBotsName will do it!