Error 429 - Rate limit exceeded the maximum. Retry the request in [24] seconds

Hello,
I am working on an issues of Genesys Cloud integration.

I am seeing following error in our production site. Does it make sense to wait for 24 seconds for a next request? Sounds like very long time for a request to retry. Can you please help to investigate the issue on Genesys side, or point me, who can assist?

com.witness.adapters.genesysPureCloud.ChannelTopicSubscribeJob$SubscriptionWork@7a759f1 failed to handle subscriptions on PureCloud Notification Channel <streaming-1-shglhdm9klunql0a3vbsvvopci, 184, OPEN>. ErrorCode<429>, ErrorMsg<{"message":"Rate limit exceeded the maximum. Retry the request in [24] seconds","code":"too.many.requests.retry.after","status":429,"contextId":"d58176ff-37ae-46aa-a584-8e07f151ca2e","details":[],"errors":[],"limit":{"key":"notification.rate.per.minute","namespace":"notifications","value":60}}>

Similar error:

[Notificati|3DB8|E] 2023-08-16 00:01:06.692-04:00 Genesys PureCloud Adapter<4, Genesys PureCloud API Adapter> failed to create new channel. Code<429> Message<{"message":"Rate limit exceeded the maximum. Retry the request in [19] seconds","code":"too.many.requests.retry.after","status":429,"contextId":"8bac9073-ca8d-4def-9a7a-c9c1b249bdb5","details":[],"errors":[],"limit":{"key":"notification.rate.per.minute","namespace":"notifications","value":60}}>

[Notificati|3DB8|E] 2023-08-16 00:01:06.702-04:00 com.mypurecloud.sdk.v2.ApiException: error Message

com.mypurecloud.sdk.v2.ApiClient.interpretConnectorResponse(ApiClient.java:554)

com.mypurecloud.sdk.v2.ApiClient.getAPIResponse(ApiClient.java:563)

com.mypurecloud.sdk.v2.ApiClient.invoke(ApiClient.java:642)

com.mypurecloud.sdk.v2.api.NotificationsApi.postNotificationsChannels(NotificationsApi.java:480)

com.mypurecloud.sdk.v2.api.NotificationsApi.postNotificationsChannels(NotificationsApi.java:452)

I did go over the limits on the page but still it doesn’t make sense to wait for 24 seconds for a system that record customers in real time. (https://developer.genesys.cloud/platform/api/rate-limits)

Another question. We face errors to add new subscribtions and new topics to a subscribtion. I can see our application attempt to add a topic for a specific agent every two minutes and fails each time.

  1. Could those failed attempts affect count of a topics on a channel?
  2. Could reaching a limit ot topics on a specific channel affect another channels ability to accept new topics?

you can do (mostly) 300 api calls/minute. in this case it 300 api calls were done in 36 seconds so you have to wait for that minute to expire before making any more. I recommend opening the notification channel first so that you aren't missing any notifications, then make the API calls and gracefully handle any 429 responses.

for your other questions:

  1. Possibly
    2 ) i don't believe so

Thanks for the information.
What is counted by api calls? Is it only for the device registration/query requests or any request to get call info also counts as an API call?

every API request that is made is counted against the rate limiter.

There are no many calls in the system when we reach the limit. Is there a way to monitor the API calls counter from Genesys side? I'd like to guide our telecom team.

When I issues an API request to search for a user or add a topic, each request made for up to 100 items. It means I should make up to 300 API calls x100 users/topics = 30 000 items requested per minute - make sense?

Hi Igor,

A couple of things:

Our rate limits are meant to signal that there is usually something wrong in your design. Usually, if you are calling a get endpoint over and over you:

  1. You should be caching on the client side to minimize the amount of calls you are doing against Genesys Cloud. We often find customers polling our API for data that does not change on a regular basis.
  2. Look at leveraging our notification event stream and listen for events as they are happening in Genesys Cloud. If you have not looked at our notification model I suggest you take a look here:

I see you are getting this on the notification service. Are you creating a new channel every time you are trying to get an incoming request? Channels are meant to be created outside the normal event-handling loop.

Hope that helps.

Thanks,
John Carnell
Director, Developer Engagement

1 We probably doing a query for users to get user id's every two minutes when we see a devices that failed to register.
2 It's production code, we are not creating new channel each time.

When a userid may change for a user?
Could it happen if user is deleted and added back?
If yes, how often it could happen?

Thanks

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.