ttezel / twit

Twitter API Client for node (REST & Streaming API)
4.31k stars 568 forks source link

Twitter Reply : 'Please use V2 filtered and sample volume stream as alternatives' #582

Open EverLab opened 1 year ago

EverLab commented 1 year ago

This error come with my script today :

Error: Bad Twitter streaming request: 403 at Object.exports.makeTwitError (/root/JavaScript/node_modules/twit/lib/helpers.js:74:13) at Request.<anonymous> (/root/JavaScript/node_modules/twit/lib/streaming-api-connection.js:96:29) at Request.emit (node:events:532:35) at Gunzip.<anonymous> (/root/JavaScript/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:1343:12) at processTicksAndRejections (node:internal/process/task_queues:83:21) Emitted 'error' event on StreamingAPIConnection instance at: at Request.<anonymous> (/root/JavaScript/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: '<html>\\n<head>\\n<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>\\n<title>Error 403 \n' + 'Please use V2 filtered and sample volume stream as alternatives\n' + '</title>\n' + '</head>\n' + '<body>\n' + '<h2>HTTP ERROR: 403</h2>\n' + "<p>Problem accessing '/1.1/statuses/filter.json'. Reason:\n" + '<pre> \n' + 'Please use V2 filtered and sample volume stream as alternatives\n' + '</pre>\n' + '</body>\n' + '</html>\n', statusCode: 403 }

Did they change something in API TWITTER ? Because my code doesn't change since last good execution

slimjimrim commented 1 year ago

bump

jerrychong25 commented 1 year ago

Please use V2 filtered and sample volume stream as alternatives

This is the root cause.

Do you found any solution for migrating to V2 Filtered Stream API?

Thank you!