slack-ruby / slack-ruby-bot

The easiest way to write a Slack bot in Ruby.
MIT License
1.12k stars 187 forks source link

Repeated 429 (ratelimited) errors from slack #280

Open eukim0704 opened 1 year ago

eukim0704 commented 1 year ago

Hi, recently there has been repeated 429 (ratelimited) errors from slack when calling conversations.list api endpoint. Slack support has suggested adding pagination to our calls but I don't see any options in the bot.

We were leaning towards using the https://github.com/slack-ruby/slack-ruby-bot-server gem and/or the related https://github.com/slack-ruby/slack-ruby-bot-server-events gem to resolve the issue but our bot was never listed, so maybe there's a way to resolve this without changing the gem? Any help would be appreciated on the issue.

dblock commented 1 year ago

What's the call stack that causes the rate limit?

The library that calls conversations.list is https://github.com/slack-ruby/slack-ruby-client. That supports pagination. https://github.com/slack-ruby/slack-ruby-client/blob/master/lib/slack/web/api/endpoints/conversations.rb#L242