Genesys Cloud - Developer Community!

 View Only

Sign Up

Expand all | Collapse all

user/search - Error 400: too.many.requested.results when pageNumber > 100

  • 1.  user/search - Error 400: too.many.requested.results when pageNumber > 100

    Posted 3 hours ago

    Hi,

    I'm using the users/search API and the client has 14,250 users.
    Since I need to query all agents, I have to query 143 pages.
    Queries with pages 1 to 100 work normally, but when the page number is greater than 100, the API returns error code 400 - too.many.requested.results.
     
    Is there any way to query these pages (101 to 143)?
    Regards.

    JMas


    #PlatformAPI


  • 2.  RE: user/search - Error 400: too.many.requested.results when pageNumber > 100

    Posted 2 hours ago

    Hi @Julio Masuda,

    The too.many.requested.results error can be a little misleading because it is not the same as an HTTP 429 rate-limit error.

    In this case, the API is returning HTTP 400 because the search request is attempting to access results beyond the maximum result window supported by the User Search service.

    With approximately 14,250 users and a page size of 100, requesting pages beyond page 100 pushes the query past the searchable result limit. The platform does not allow unrestricted pagination through very large result sets.

    The recommended approach is to partition the search into smaller subsets rather than attempting to retrieve all users through a single search query. Common approaches include filtering by:

    • Division
    • State (active/inactive)
    • Roles
    • Name ranges
    • Custom attributes

    Then paginate each subset independently.

    For large organizations, this tends to be the most scalable approach and avoids hitting the search result window limitation.



    ------------------------------
    Gabriel Garcia
    NA
    ------------------------------