Chat-integration plugin "Error: unable to fetch users from Slack" when running /post in large (17,000+) slack instance

I’m also getting this error! No success in a private or public channel, both of which have the bot added.

Did you ever figure this out?

For what it’s worth, my Slack instance has 17,000+ users, so I am wondering if something is going wrong with the users.list endpoint? I am able to successfully return a very long users.list response via Slack’s API tester, using the same token provided in Discours settings. users.list method | Slack

One theory on what might be going wrong: it looks like Discourse is paginating 200 users at a time, which would require 85+ API calls.

Users.list is a Tier 2 rate limited endpoint:

Web API Tier 2
20+ per minute
Most methods allow at least 20 requests per minute, while allowing for occasional bursts of more requests.

Is it possible that this is a rate limit issue?

I also can’t seem to access any more detailed log info on this, on my discourse hosted instance. But happy to help debug if useful!

Are you hosted with us? If so, you can contact us directly for support if you need us to look into more detailed logs. :+1: