How to Get Direct Messages more than 15 messages(Standard Account) per 15 minute it will block when 16th request send

direct-messages

#1

Hi I have a standard account and is it possible to get more than 15 requests per 15 minute as i found in some documentation for Direct Messages ? Direct message api streaming is not available in standard account now so is it possible in any way to get real time messages using api if messages limits increase by 15 requests per 15 minute ?


#2

Hey there! You’ve got the option of using the Account Activity API to receive Direct Messages in real-time for an account. If you do not want to do this, then yes you’ll hit your rate limits by calling too often.


#3

ok and Account Activity API is in premium account because its not working in standard account i am using twitter4J ?


#4

Unfortunately Twitter4J doesn’t support the premium endpoints yet https://github.com/Twitter4J/Twitter4J/issues/306


#5

Okay then how can I access these end points in easy method any suggestion ?


#6

In java i think a good way to go is to use something like scribe to help you build and sign your own requests https://github.com/scribejava/scribejava


#7

Can you please share link of direct message example of scribejava ?


#8

I don’t have a working example for DMs working with scribe in java, scribe is a general purpose OAuth library that will make it easier to make calls - but it won’t be specific to twitter, so you’ll need to follow the documentation to build these endpoints yourself: https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference