Too Many Requests Error

When trying to use GetConversationIdDetails in a foreach loop, I get a 429 error on my 298th attempt.

I have a list of 388 calls, in this case, and I'm fetching them 100 at a time, then grabbing the details for each call one at a time, then moving on to the next page.

When I get to processing the 298th call, I get a 429 response. Too Many Requests.

How can we use the API to do something like this and build a new data set by grabbing various pieces of information from each call we have in a list?

When you get rate limited, look at the response headers to see how long you need to wait before making more requests (retrying the request that got the 429). More info here: https://developer.mypurecloud.com/api/rest/troubleshooting/rate_limits.html

Thanks Tim! The .Net exception doesn't provide the rate limiting info in the exception details, but this was good enough for me to add a rate throttle to the app.

Ah, that's right. I have API-1830 pending to enhance the WithHttpInfo variety of the methods. Among other things, one of the enhancements is to suppress errors and return them as a property of the ApiResponse object. This would allow you to get access to the response headers even when the response was unsuccessful.