Okay, so -1 to anyone suggesting it’s just a simple throttling issue.
We’re polling the /api/v2/analytics/queues/queueId/metrics endpoint - you know, standard queue stats - every 30 seconds. It’s to power a small widget on our internal portal. The idea is, if agents are on AUX, show it, if not, show the queue length. Pretty basic.
The code itself is in a SvelteKit server route. It’s using fetch with the platformClient for auth. That’s the official method, right? It’s all OAuth proxied, so the token should be valid. The platformClient version is 6.1.0.
But we’re getting intermittent 429 Too Many Requests errors. Which is… strange.
I’ve checked the rate limits documentation - it says 60 requests per minute. We’re well below that, even allowing for a bit of buffer. The widget is only tracking a handful of queues. It’s not like we’re hammering it with hundreds of requests.
Here’s a sample error payload. It’s not consistent - sometimes it’s a different error message, but always a 429.
{
"message": "Rate limit exceeded. Please try again later.",
"code": 429,
"details": [
{
"field": null,
"message": "Rate limit exceeded"
}
]
}
The logs show the request going out with a valid access token. We’re handling the token refresh properly. It’s not a token issue. I think it’s something with the endpoint itself. +1 if someone’s seen this before. Is there a hidden rate limit I’m missing? It’s breaking the widget, and we need it to be RELIABLE.