API error: too many requests


#1

RocketChat version: 0.65.1
Number of instances: 1

I have made a connection between our website and RocketChat. We do have a few hundred members and I often get the following message:

{“success”:false,“error”:“Error, too many requests. Please slow down. You must wait X seconds before trying again. [error-too-many-requests]”,“errorType”:“error-too-many-requests”}

How can I work around this issue? There doesn’t seem to be a setting to remove or see what the limit is set to for the API. Since I’m the only one using it im happy to just have no limit set at all.


#2

When do you get this? Are you actually rapidly performing an action via the api?


#3

I’m not doing any rapidly actions. It seems like this error occurs the most when setting the avatar for user by calling “users.setAvatar”. I’m logging all the calls im doing to the RocketChat API now but I don’t see anything strange going on. Most calls are update user calls or set avatar calls.

The only “rapid calls” I’m making is every 5 minutes I’m doing 3 calls:
users.list?query={“status”:“online”}&count=1: []
users.list?query={“status”:“busy”}&count=1: []
users.list?query={“status”:“away”}&count=1: []

Without any delay in between because I want to calculate the total of users present with any of those 3 statuses.


#4

A bit late on this. But artificial delay to confirm. But i think a permission exists to bypass the rate limita on the api