https://developer.twitter.com/en/apply-for-accessNote: Review & approval usually takes 10–15 days.
https://developer.twitter.com/en/account/get-started
Note: Change the app permissions to “Read, write, and direct messages” & generate the access token.
Run command: node app.js
OR
Use Open Source Developer friendly Twitter Connector.
iconicbot/iconic-narada_Open Source Webhook Boilerplate for Social Media/Messaging Platforms(Facebook, Facebook Messenger, Twitter, Twitter…_github.com
run the following command on the same directory using terminal/command prompt: ngrok http 1337Copy the “https” url. (It will be something like https://XXXXXX.ngrok.io)
Git clone https://github.com/twitterdev/account-activity-dashboard.gitrun the module using “npm start” using the terminal/command prompt
open “localhost:5000” on the browser.Click on “Manage Webhook”Paste the “ngrok url” into “Create or Update Webhook” field & click submit
Open terminal/Command promptGoto “account activity dashboard” folderexecute “node example_scripts/subscription_management/add-subscription-app-owner.js -e <TWITTER_DEV_ENV_NAME>”note: Add user subscription for the user that owns the app.
Goto Twitter DM & start talking to your bot