Rate limits for direct message media using ton.twitter.com



Hi everyone,

My app is currently retrieving images for direct messages by calling the relevant media url with valid oAuth credentials.

e.g. https://ton.twitter.com/1.1/ton/data/dm/411031503817039874/411031503833792512/cOkcq9FS.jpg

However there appears to be a rate limit of 50 requests per 15 mins enforced, but I haven’t been able to find any information on this in the Twitter API documentation or in the forums.

Can anyone confirm that 50 requests is the definitive rate limit for using the ton.twitter.com api?



We don’t document rate limits for that endpoint, so I’m afraid at present we are not able to confirm those numbers. I’ll add this to our list of potential documentation improvements but I’m not able to suggest a timescale for when this may be clarified.


Hi Andy, I have a follow up question you. Is the rate limiting for the Direct Message Images applied per application i.e. for one cusumer key and secret?

So for example if an oAuth request invokes the rate limit, then a second oAuth request is made with the same Consumer key & Secret but a different accessToken & Secret, will the rate limit be applied to this request?



It would be on a per-user authenticated in the app basis. i.e. each logged in user (token/secret) would have their own rate limit applied.


Thanks for getting back to me Andy.

Unfortunately that’s not what I’m seeing when I’m using the TON API. I have two users for the same app, when one user is used to invoke the rate limit, then the rate limit is in effect for any subsequent requests by the other user. Can you provide any more information on this?


To be fair, I’m a lot less familiar with TON than I am with the other APIs, so I’d have to check further on that. My statement was about rate-limiting in general, so I apologise for any confusion! I’ll see what I can find out but it might take a couple of days.



OK, having done some digging, I can confirm that the rate limit you’re seeing is expected. The TON API is currently primarily provided for the use of e.g. Ads API partners needing to upload tailored audiences, rather than being intended for image access on DMs.

Unfortunately there’s currently no way to modify this - appreciate this isn’t the response you’re hoping for (and I noticed your #HelloWorld request for better docs on this too) - but that’s the current state.


Thanks for your response Andy, I appreciate you looking into that for me.


@andypiper and @markriddell - did this issue ever get resolved?

I’m coming up against the same thing, and am wondering if you ever found a workable solution?




There haven’t been any changes to this since my last comment back in Nov 2015. However, we are working on some new DM experiences at the moment and you can expect to see some changes more-or-less related to DMs in the future. I’m not aware of plans to make changes to the TON API at the moment.


Thanks for the info! So @andypiper - these improvements to “DM Experiences” - you don’t think this will improve rate limiting for this use case? As the images we see in DMs all seem to come from the TON api from what I can see.

Our use case is displaying DM’s in our app, allowing our customers to provide customer care for 1 to many Twitter handles. Our app has been live in prod for years, and some uptake on this feature has brought this to our attention.


I’m not currently aware of plans to change limits related to TON - I can’t comment on specifics of other changes in the new API features in beta that might change the way this works.


ok… thanks @andypiper for the info… much appreciated!


Hi Andy,
Is the rate limit of 50 requests per 15minutes, enforced per user authenticated in app, or is it in the grounds of per app?

I made a twitter app and authenticated 2 twitter profiles. I noticed that rate limit seems to be on per app basis but couldn’t find it in the Twitter API documentation.
Can you please confirm the rate limits.


Hi @andypiper,
Is there any way to overcome the DM images rate limit?
A paid API for example? or the new endpoints for DM interaction?