Any way to get the rate_limit_status of direct_messages/events/new?


#1

I really like how I can query “application/rate_limit_status” to get how many requests I have remaining for various endpoints, but I cannot find one for “direct_messages/events/new”.

I see other direct_messages/events/* endpoints listed but nothing for /new.

Is there any other way to get this info.

Thanks


#2

Since this is a POST request, this is an account limit, not a rate limit.

I’d also suggest that using the X-Rate-Limit HTTP headers is a good way to keep track of your GET requests, rather than constantly calling the application/rate_limit_status endpoint.


#3

Thanks for the Tip I will start looking at those.

For the POST requests that are account limits, will they also have a X-Rate-Limit header?
If not then what is the best way to know how many you have left?

If I am running the Rest API as an App for someone, but they are also using other third part Apps that may be also using the same calls then it would be ideal for me to know how many I have left. Simply just keeping track of of how many Direct Messages my App has sent on behalf of a User as it compares to 1000 per day is not enough as like I said the User may be using other third party Apps that use up that limit as well. So I would like to get how many I have left, Preferably, before I make a call.

Any help would be appreciated.
Thanks


#4

There is no ongoing status for POST requests, you have to calculate from the stated account limits.


#5

OK, thanks

What would be the best way to make this a feature request?


#6

You’re welcome to ask here, but POST limits have always been handled this way and I would not think that this is likely to change.