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

**URL:** <https://meta.discourse.org/t/chat-integration-plugin-error-unable-to-fetch-users-from-slack-when-running-post-in-large-17-000-slack-instance/281870>\
**Category:** Bug\
**Tags:** chat-integration\
**Created:** [October 11, 2023, 12:11pm UTC](https://meta.discourse.org/t/chat-integration-plugin-error-unable-to-fetch-users-from-slack-when-running-post-in-large-17-000-slack-instance/281870 "2023-10-11T12:11:12Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![CaseyG](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/caseyg/32/131419_2.png) [@CaseyG](https://meta.discourse.org/u/CaseyG)\
**Post date:** [October 11, 2023, 12:11pm UTC](https://meta.discourse.org/t/chat-integration-plugin-error-unable-to-fetch-users-from-slack-when-running-post-in-large-17-000-slack-instance/281870/1 "2023-10-11T12:11:12Z")

</div>

> [@Slack threads and chat integration plugin transcripts](https://meta.discourse.org/t/slack-threads-and-chat-integration-plugin-transcripts/71909/35):
>
> I’m getting the error: “Error: unable to fetch users from Slack”

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](https://api.slack.com/methods/users.list/test)

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](https://api.slack.com/docs/rate-limits#tier_t2) 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?

> <https://github.com/discourse/discourse-chat-integration/blob/4f9ccb58cae8600dcb6db84f38f235283911e6e8/lib/discourse_chat_integration/provider/slack/slack_transcript.rb#L277>

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!

---

_[View the full topic](https://meta.discourse.org/t/chat-integration-plugin-error-unable-to-fetch-users-from-slack-when-running-post-in-large-17-000-slack-instance/281870)._
