问题
We use the Sonos Control API to control the Sonos Speakers in a Smart Home System. Now we seem to have hit the rate limit for the requests sent to the API.
We get the error 429 Too Many Requests. As described here https://developer.sonos.com/build/direct-control/control/ this means that we have hit the rate limit of the Sonos API. But there is no detailed information about the limits.
So I have the following questions:
- How much requests are allowed until the rate limit is hit?
- When is the rate limit being reset?
- Is the rate limit per Integration or per Customer/IP?
At the moment we make a request per minute/per customer to get the groups, favorites, etc. We plan to change this behavior to use the subscriptions. But also if we use the subscription it would be good to know if we still could hit the rate limit if many customers make a request at the same time.
回答1:
We generally don't rate limit unless we notice bad behavior. In that case, we manually rate limit or block clients at our discretion.
Consider using subscriptions instead of polling to monitor changes to groups and favorites.
来源:https://stackoverflow.com/questions/60491677/sonos-control-api-rate-limit