The Instructure Community is fully available, including guides, release notes, forums, and groups. If some styling still looks unusual, clear your cache and cookies.
Found this content helpful? Log in or sign up to leave a like!
Hey everyone.
Newbie here.
I'm looking through the docs, specifically the page on throttling. It say that I'll receive a 403 Forbidden (Rate Limit Exceeded) response if I'm over my limit.
Question 1: How do I differentiate between a vanilla 403 and this context heavy 403? Am I suppose to check the ReasonPhrase of the HttpResponseMessage?
Question 2: If I'm paging through a whole bunch of data could I expect my quota to be exceeded between one call and the next? Or is the quota for the entire query guessed at, pre-flight?
Thanks in advance
For question 2, it may be good to review this prior article on API Rate Limiting. In general, if you are awaiting a response before sending the next request, you won't run into rate limiting issues. However, if you are sending multiple calls at once (asynchronously), then you could run into rate limiting issues if you aren't careful and some of the requests will be successful while others have a 403 response. If you are making multiple calls at once on a large scale, be sure to batch your calls so that you don't send too many at once and await the response from the batch before another batch. The amount of calls you can send at once will vary depending on the specific API call. The more data that is returned from an API call, the fewer calls you can make at the same time before throttling will affect you. I try to monitor the limit that is remaining from the response header to see if I should add in extra wait time before sending another response if the limit starts to get too low.
As for question 1, I haven't checked the specific type of 403 response before, but that does sound like a good idea to automate re-sending the request if the rate limit is exceeded. Typically, I do some testing to ensure my batches aren't too large and I add in some extra wait time between batches (as needed) when performing asynchronous calls to avoid the 403 error. I think the body of the response will have the reason for the error, but I would need to do testing to confirm. Perhaps someone else has more insight on this already and can share how they analyze the error codes in their scripts.
To interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in