Replies: 2 comments 3 replies
-
I'm trying to implement this as well. It looks like there's a custom const stream = await client.v1.stream.getStream('direct_message/events/new.json');
stream.on(
ETwitterStreamEvent.Data,
(data: any) => console.log(data)
);
stream.on(
ETwitterStreamEvent.ConnectionError,
(err: any) => console.log(err)
);
stream.on(
ETwitterStreamEvent.ConnectionClosed,
(err: any) => console.log(err)
);
Response:
{
"type": "response",
"code": 404,
"error": "",
"headers": {
"date": "Sat, 12 Feb 2022 14:48:03 UTC",
"server": "tsa_b",
"set-cookie": [
...
],
"cache-control": "no-cache, no-store, max-age=0",
"content-length": "0",
"strict-transport-security": "max-age=631138519",
"x-response-time": "7",
"x-connection-hash": "",
"connection": "close"
},
rateLimit: undefined,
data: ''
} Not sure if the library supports this.. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Shortly: Live-time direct messages are available through Account Activity API, a paid API that runs with webhooks (so, cannot be used with this client, as it requires a HTTP server on your side). |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to be able to receive direct messages in real time
Beta Was this translation helpful? Give feedback.
All reactions