Problem with Twitter direct message, No reply

very good :muscle::+1:

hi there
good work [Malhakbani] but i have a problem that when i send message it take 2 minute that node recive it!!
can i solve it?

@mwahab82 the Twitter APIs are heavily rate limited - we are only able to check for new messages one a minute or so. There's nothing we can do about that from our side.

thanks for your replay
but in case of dialogflow ,when integrate with twitter the dm detect message every second or less
so what is the difference?

As a hosted service they are able to access Twitter apis that we cannot.

thanks
is there are any work around to do this?
i mean do i need to code it my side ?and if it available can you give me github sample project?
best regards

You cannot work around the APIs that twitter provides - https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/overview

They provide two apis.

  • You can retrieve Direct Messages from up to the past 30 days with GET direct_messages/events/list. This is what our node does - and as described by those docs, can only make 1 request a minute before it gets blocked.

  • Consuming Direct Messages in real-time can be accomplished via webhooks with the Account Activity API. This is the option to get more timely notification of new DMs. To use this API you need to expose your Node-RED on the internet so Twitter is able to call back whenever there's a new event. Because of that requirement, it is not suitable for the majority of our users who run on devices on private home networks. We have not implemented the code for this - you'd have to read the api docs to understand what is required and create the code yourself.

1 Like

i didn't find enough words to thank you.
appreciated.

Does your use case really require Twitter ? and such timely delivery ? There may be other applications that are more timely, more secure, different client API capability etc... eg Telegram

yes my case require Twitter.
i connect sms and whatsaap successfully,there is no time delay.
but twitter until now i couldn't find solution

OK - in that case you are stuck with what Twitter gives us.