Same problem here.
I used the exact same bearer token which is used for the slack integration in jira where I can see the private channels.
It is a problem due to that the private channel belongs to my personal slack account and scriptrunner doesn't have persmission to see private user channels?
I read on the slack integration that you can only see and select private channels of the users which connected their account with the slack-integration.
In order to connect to any Slack channels you must first confirm access to your Slack account. On the Slack integration screen in Jira (in both Project and Global Admin), you'll see a link to do this under "Connection status" if you haven't done it yet. Clicking this link will take you to a Slack auth link, which will give the app the ability to view your channels.
Once you've completed this step, you should now see "You're accessing Slack as [
Your Name]", and should now be able to select private channels from the drop down. Each user who wants to connect their private channels to the Slack integration will need to do this step.
Atlassian's marketplace partners have had a very productive start to 2021! Since our last roundup, our developer community has added over 160 new cloud apps to the Atlassian Marketplace to help you...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event