Original Message:
Sent: 04-08-2025 05:25
From: Naoki Ono
Subject: Question regarding API call limit in Data Actions
Hello, Orhun.
Thank you for your response.
I understand that every time the limit of `client.credentials.token.rate.per.minute` (300 requests) is exceeded, the token cache is re-created. However, the token cache re-creation seems to fail on the third attempt, resulting in data action failures around 900 requests.
That said, apart from `client.credentials.token.rate.per.minute`, there is another limit called `token.rate.per.minute`. Are we not running into this limit?
Additionally, I have another question from a different perspective:
The mechanism we are trying to implement with the data action is to count the number of online users in a specific queue. However, real-time accuracy is not highly required for this task. Therefore, how about this approach:
1. Execute the data action once to count the number of online users.
2. Write this information into a data table.
3. Only when this information becomes outdated (e.g., after 1 minute or more), re-execute the data action API to update the online user count.
What do you think about this solution?
------------------------------
Naoki Ono
Original Message:
Sent: 04-07-2025 11:14
From: Orhun Sahin
Subject: Question regarding API call limit in Data Actions
Hi Naoki,
Since your Data Action uses OAuth Client Credentials, it operates without a user context and primarily hits the default 300 RPM per token limit ( client.credentials.token.rate.per.minute).
Failing around 900 calls strongly suggests you're hitting this 300 RPM limit multiple times sequentially (if token refreshes occur). This aligns with documented Data Action behavior:
- Data Actions cache and reuse authentication tokens.
- Critically, as per Genesys documentation, when a request using a cached token fails (which includes getting a 429/Too Many Requests error upon hitting the RPM limit), the Data Action automatically acquires a new token and retries the failed request.
This automatic retry mechanism explains how your flow could surpass the initial 300 calls within a minute. It likely hits the 300 limit -> gets 429 -> auto-refreshes token -> retries & continues -> hits 300 limit on the new token -> gets 429 -> auto-refreshes again -> retries & continues, eventually failing around the 900 mark when either the third token's limit is hit or another ceiling is reached.
That other ceiling could still be the secondary platform concurrency limit. Specifically, Genesys Cloud typically limits organizations to a maximum of 50 concurrent Data Action executions. Even with the token refreshes happening, your rapid loop might still attempt to initiate more than 50 concurrent actions (including retries) before prior ones complete.
Recommended Solution:
- Contact your Customer Success Manager (CSM).
- Request an increase for the specific rate limit applied to this OAuth Client's tokens. Ask them to raise the
client.credentials.token.rate.per.minute to at least 1000 RPM.
Important Consideration: Increasing the client's RPM limit to 1000+ should allow your test to pass if the bottleneck is purely the RPM limit (being hit sequentially). However, if the primary issue is hitting the 50 concurrent execution limit or hitting the 3000 total RPM via Client Credentials Grant, simply increasing the RPM limit might not solve the problem, and you may need to introduce small delays:(throttles) within your Architect loop. Discuss both the RPM limit increase (which now seems the most likely initial bottleneck based on the auto-retry behavior) and the potential impact of the 50 concurrent execution limit with your CSM.
Raising your specific client's RPM limit is the most direct step based on the evidence.
For a broader understanding of general organizational limits and the specifics of API rate limiting that might apply in addition to the client token limits and concurrency rules discussed, reviewing the official Genesys Cloud documentation is helpful:
------------------------------
Orhun Sahin
Software Development Engineer
Original Message:
Sent: 04-07-2025 08:11
From: Naoki Ono
Subject: Question regarding API call limit in Data Actions
I created a Data Action using OAuth Client Credentials.
This Data Action performs a simple API call for testing purposes using the endpoint:
/api/v2/organizations/me
(Note: This is purely for validation, and the result is not used meaningfully.)
Next, I built a call flow (Call Flow ①) that loops this Data Action invocation 1000 times within one minute for testing purposes.
Based on my understanding, the first rate limit we would encounter is:
org.app.user.rate.per.minute (3000 calls per minute)
Therefore, I expected 1000 calls to be executed without any issue.
However, in practice, the process failed after around 900 calls, raising an error event.
To investigate further, I created another call flow (Call Flow ②) that performs the same loop for 1000 calls using the same API endpoint.
However, for this call flow, I created a new Data Action with a different OAuth Client Credentials.
Despite using separate OAuth Clients, both Call Flow ① and Call Flow ② failed at approximately 900 calls.
Since the API endpoint itself does not have specific rate limits, I expected the overall execution limit to increase with the use of separate OAuth clients.
Why are these calls failing? What rate limit or restriction could this behavior be tied to?
#DataActions
#PlatformAPI
------------------------------
Naoki Ono
------------------------------