xdevplatform / Twitter-API-v2-sample-code

Sample code for the Twitter API v2 endpoints
https://developer.twitter.com/en/docs/twitter-api/getting-started/about-twitter-api
Apache License 2.0
2.61k stars 967 forks source link

How to do a Webhook connection using Twitter activity Api v2 to create a chatbot and access DM? using BASIC plan. #143

Open Abdelmohsin opened 8 months ago

Abdelmohsin commented 8 months ago

I have followed the installation instructions - GitHub - twitterdev/account-activity-dashboard: Sample web app and helper scripts to get started with the premium Account Activity API & have set ngrok to tunnel localhost (this is all working fine I am using the ‘free’ version of ngrok currently)

When I go to localhost:5000 OR http://de096xxx.ngrok.io I see the sample Twitter Dev Account Activity Dashboard app and when I try to create a new webhook using the ‘Mange Webhook’ button I get the following error

‘Webhook config unable to be retrieved’ - can anyone explain what I am doing wrong, I have checked the relevant keys are correct, added the callback URI’s to the Twitter app and we have Premium API access so I am a little unsure what I have not done with the setup steps?

node example_scripts/webhook_management/create-webhook-config.js -e beta -u https://de096xxx.ngrok.io When I run these commands I get a load of JSON but see this within the body of the JSON - any ideas? {"errors":[{"code":200,"message":"Forbidden."}]}' }