python-twitter icon indicating copy to clipboard operation
python-twitter copied to clipboard

DirectMessage API

Open pyMixin opened this issue 6 years ago • 2 comments

How direct messages API actually work? I am trying to get last "n" direct messages from my twitter account?

Please let me know

pyMixin avatar Jun 06 '19 21:06 pyMixin

Same q here. Is there a way to stream messages?

Kyu avatar Apr 16 '20 03:04 Kyu

The maximum number of DMs you can grab is 200 and if you use the following code GetDirectMessages(count=n) with n being less than 200 then it will grab those direct messages. Based on the documentation I believe if you do not pass anything then you will not get any results.

Also, that code will only return the direct messages sent to the authenticated user. You will need GetSentDirectMessages for the ones that you have sent.

Finally, if you are having a 34 error then reference this issue to fix it https://github.com/bear/python-twitter/issues/603

Bracciata avatar May 12 '20 16:05 Bracciata