Open slishnevsky opened 5 days ago
Hello, the package works for image upload , but when I try to upload a video file less than 10MB I get same error message, if u find any solution kindly let me know.
postTweets('d:/Pictures/Twitter/Images');
Doesn't work for me, here I want to post images, but still getting the error.
postTweets('d:/Pictures/Twitter/Images');
PS D:\Projects\NodeApps> node twitter
Trying to post next tweet: canada.png
Trying to post next tweet: israel.png
Trying to post next tweet: usa.png
Media upload failed ApiResponseError: Request failed with code 403
at RequestHandlerHelper.createResponseError (D:\Projects\NodeApps\node_modules\twitter-api-v2\dist\cjs\client-mixins\request-handler.helper.js:104:16)
at RequestHandlerHelper.onResponseEndHandler (D:\Projects\NodeApps\node_modules\twitter-api-v2\dist\cjs\client-mixins\request-handler.helper.js:262:25)
at IncomingMessage.emit (node:events:531:35)
at endReadableNT (node:internal/streams/readable:1696:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
error: true,
type: 'response',
code: 403,
headers: {
perf: '7402827104',
'cache-control': 'no-cache, no-store, max-age=0',
'content-length': '0',
'x-transaction-id': '9b55b9a9603eb08d',
'x-response-time': '5',
'x-connection-hash': '2d88f3cc0f9ff267b2ad846ade9c73f9e3f4ee421dbb2386a8b9bec5b9dfe8d1',
date: 'Mon, 02 Dec 2024 12:42:48 GMT',
server: 'tsa_b'
},
rateLimit: undefined,
data: ''
}
Media upload failed ApiResponseError: Request failed with code 403
at RequestHandlerHelper.createResponseError (D:\Projects\NodeApps\node_modules\twitter-api-v2\dist\cjs\client-mixins\request-handler.helper.js:104:16)
at RequestHandlerHelper.onResponseEndHandler (D:\Projects\NodeApps\node_modules\twitter-api-v2\dist\cjs\client-mixins\request-handler.helper.js:262:25)
at IncomingMessage.emit (node:events:531:35)
at endReadableNT (node:internal/streams/readable:1696:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
error: true,
type: 'response',
code: 403,
headers: {
perf: '7402827104',
'cache-control': 'no-cache, no-store, max-age=0',
'content-length': '0',
'x-transaction-id': '7da8d3b6a27808c9',
'x-response-time': '3',
'x-connection-hash': 'ff3cb43c854f195c55f5010d6ecc59b5540ea960f4d36a69a731035a59024199',
date: 'Mon, 02 Dec 2024 12:42:48 GMT',
server: 'tsa_b'
},
rateLimit: undefined,
data: ''
}
Media upload failed ApiResponseError: Request failed with code 403
at RequestHandlerHelper.createResponseError (D:\Projects\NodeApps\node_modules\twitter-api-v2\dist\cjs\client-mixins\request-handler.helper.js:104:16)
at RequestHandlerHelper.onResponseEndHandler (D:\Projects\NodeApps\node_modules\twitter-api-v2\dist\cjs\client-mixins\request-handler.helper.js:262:25)
at IncomingMessage.emit (node:events:531:35)
at endReadableNT (node:internal/streams/readable:1696:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
error: true,
type: 'response',
code: 403,
headers: {
perf: '7402827104',
'cache-control': 'no-cache, no-store, max-age=0',
'content-length': '0',
'x-transaction-id': '41e67b007c0de877',
'x-response-time': '3',
'x-connection-hash': '7d029014d780abe43570ef5e1fa3ca897da0cc40849959b795b10220fd29d1a8',
date: 'Mon, 02 Dec 2024 12:42:48 GMT',
server: 'tsa_b'
},
rateLimit: undefined,
data: ''
}
Here is the code in Node.js:
Why am I getting these non-descriptive error messages?