ttezel / twit

Twitter API Client for node (REST & Streaming API)
4.32k stars 573 forks source link

Bad Twitter streaming request: 403 #574

Open VoidGekido opened 2 years ago

VoidGekido commented 2 years ago

i don't really know how to switch to v2 i was hoping someone could help me with it or is there something wrong with the code? image_2022-07-05_180616712

Error: Bad Twitter streaming request: 403 at Object.exports.makeTwitError (F:\AI-CHIBI\node_modules\twit\lib\helpers.js:74:13) at Request. (F:\AI-CHIBI\node_modules\twit\lib\streaming-api-connection.js:96:29) at Request.emit (node:events:532:35) at Gunzip. (F:\AI-CHIBI\node_modules\request\request.js:1076:12) at Object.onceWrapper (node:events:639:28) at Gunzip.emit (node:events:520:28) at endReadableNT (node:internal/streams/readable:1346:12) at processTicksAndRejections (node:internal/process/task_queues:83:21) Emitted 'error' event on StreamingAPIConnection instance at: at Request. (F:\AI-CHIBI\node_modules\twit\lib\streaming-api-connection.js:99:14) at Request.emit (node:events:532:35) [... lines matching original stack trace ...] at processTicksAndRejections (node:internal/process/task_queues:83:21) { code: null, allErrors: [], twitterReply: '\n\n\nError 403 \n' + 'Please use V2 filtered and sample volume stream as alternatives\n' + '\n' + '\n' + '\n' + '

HTTP ERROR: 403

\n' + "

Problem accessing '/1.1/statuses/filter.json'. Reason:\n" + '

    \n' +
'Please use V2 filtered and sample volume stream as alternatives\n' +
'
\n' + '\n' + '\n', statusCode: 403 }

mahdikhan786 commented 1 year ago

Did you found any solution ?

AlexandruMares commented 1 year ago

Is this thing still works?

urko-b commented 1 year ago

I think this is happening: https://github.com/ttezel/twit/issues/571#issuecomment-1246081326

anthonyattard commented 1 year ago

Getting this error today, shame to see Twitter api being made worse.

atnjqt commented 1 year ago

@anthonyattard any resolution? Funny enough, I also ran into this yesterday March 16 2023

anthonyattard commented 1 year ago

@anthonyattard any resolution? Funny enough, I also ran into this yesterday March 16 2023

Looks like the resolution is to hit the v2 endpoints but this library hasn't been updated for it. May have to find an alternative or fork this one. Elon finally cut us off!

anthonyattard commented 1 year ago

@atnjqt replace twit with the official twtitter v2 api library https://github.com/twitterdev/twitter-api-typescript-sdk Had to rework my project but am back up and running!