Closed shajanjp closed 6 years ago
Hi,
The code in the doc is not a functionnal sample.
You're getting this error because your webhook is not registered to the Twitter API. The reason is that twitter can't reach your webhook endpoint, look at the bottom of the error : Non-200 response code during CRC GET request
to make sure that your webook endpoint is properly configured you should open this in a browser : https://your.domain/path/to/webhook?crc_token=123
You should get a response like this {"response_token":"sha256=3d5U2qieYMPE/+sofKYOeSE6BkVKMqFiP+acNgeUGrYg"}
Thanks, my webook endpoint was not properly configured.
Thanks, my webook endpoint was not properly configured.
did you resolve it.i've got same issue..
Hi, could you show me your code please ?
const userActivityWebhook = twitterWebhooks.userActivity({ serverUrl: 'https://b216d341.ngrok.io', route: '/', consumerKey: '**', consumerSecret: '', accessToken: '', accessTokenSecret: '*', environment: '', //default : 'env-beta' app });
//Register your webhook url - just needed once per URL userActivityWebhook.register();
//Subscribe for a particular user activity userActivityWebhook.subscribe({ userId: 'my user id', accessToken: 'my access token', accessTokenSecret: 'my access token secret' }) const server = https.createServer({ app });
server.listen(6000);
Tour serverUrl should be accessible to the world. The error message « Webhook URL must be defined to create subscriptions » mean that Twitter cannot reach your server.
You should get a valid response from this url : https://b216d341.ngrok.io/?crc_token=123456
Tour serverUrl should be accessible to the world. The error message « Webhook URL must be defined to create subscriptions » mean that Twitter cannot reach your server. You should get a valid response from this url : https://b216d341.ngrok.io/?crc_token=123456
actually i got this when i test..
You have to route your server’s port 443 to your node app, not to an Apache server
thanks. can i use the ngork for serverURL? and i have used the server port 443 as result is :Error: listen EACCES: permission denied 0.0.0.0:443
Yes you can use ngork but you have to shut down your Apache server
i am new to this, could you please tell me how to get ServerUrl??
Hi , im not sure why im get
Error: Webhook URL must be defined to create subscriptions.
even my url is working .
I am getting this error when running the sample code Error: Webhook URL must be defined to create subscriptions