I am trying to develop a Twitter bot using OpenAI gpt-3 library, following https://www.youtube.com/watch?v=V7LEihbOv3Y&t=1s this tutorial.
I am getting this same error again and again. I clicked on AUTH link and authorized the bot. When I clicked on the other two links, I got this error. I have recently got Elevated access for my Twitter bot and hence, tried using this bot again.
What should I do? Please help, thank you.
Code :-
=== Serving from '/Users/tanmayjuneja/Documents/demos/twitterbot'...
⚠ Your requested "node" version "16" doesn't match your global version "12". Using node@12 from host.
i functions: Watching "/Users/tanmayjuneja/Documents/demos/twitterbot/functions" for Cloud Functions...
✔ functions[us-central1-auth]: http function initialized (http://localhost:5000/twitterbot-e8123/us-central1/auth).
✔ functions[us-central1-callback]: http function initialized (http://localhost:5000/twitterbot-e8123/us-central1/callback).
✔ functions[us-central1-tweet]: http function initialized (http://localhost:5000/twitterbot-e8123/us-central1/tweet).
⚠ functions: The Cloud Firestore emulator is not running, so calls to Firestore will affect production.
i functions: Beginning execution of "auth"
⚠ Google API requested!
- URL: "https://oauth2.googleapis.com/token"
- Be careful, this may be a production service.
i functions: Finished "auth" in ~1s
i functions: Beginning execution of "callback"
⚠ Google API requested!
- URL: "https://oauth2.googleapis.com/token"
- Be careful, this may be a production service.
i functions: Finished "callback" in ~3s
i functions: Beginning execution of "callback"
⚠ functions: Error: Request failed with code 400
at RequestHandlerHelper.createResponseError (/Users/tanmayjuneja/Documents/demos/twitterbot/functions/node_modules/twitter-api-v2/dist/client-mixins/request-handler.helper.js:103:16)
at RequestHandlerHelper.onResponseEndHandler (/Users/tanmayjuneja/Documents/demos/twitterbot/functions/node_modules/twitter-api-v2/dist/client-mixins/request-handler.helper.js:252:25)
at Gunzip.emit (events.js:327:22)
at endReadableNT (_stream_readable.js:1221:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
⚠ Your function was killed because it raised an unhandled error.
i functions: Beginning execution of "tweet"
⚠ Google API requested!
- URL: "https://oauth2.googleapis.com/token"
- Be careful, this may be a production service.
⚠ functions: Error: Request failed with status code 400
at createError (/Users/tanmayjuneja/Documents/demos/twitterbot/functions/node_modules/axios/lib/core/createError.js:16:15)
at settle (/Users/tanmayjuneja/Documents/demos/twitterbot/functions/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/Users/tanmayjuneja/Documents/demos/twitterbot/functions/node_modules/axios/lib/adapters/http.js:322:11)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (_stream_readable.js:1221:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
⚠ Your function was killed because it raised an unhandled error.