Closed jokoast closed 4 years ago
Hello,
Sorry for this very late response. I understand your issue because I had the same. To kill a webhook registration you need it's id. You cannot kill webhooks without id. I made a request to twitter in order they implement a way to kill webhooks with it's url instead of it's id : https://twittercommunity.com/t/account-activity-delete-subscription/110634
So ! If you wan't to unregister your webhook at each start. You first need to query your webhooks list to twitter's API. You can use the getWebhooks()
method of this package in order to make this request. It will return a list that contains your webhooks with their id. Then you can unregister your webhook(s) and create new one(s). Is this clear ?
Sorry i didn't read all your message. You are already using the getWebhooks() method...
Ok so the doc for the unregister method is not complete... Sorry for that.
you need to use it like that :
userActivityWebhook.unregister({webhookId: webhooks.environments[0].webhooks[0].id});
Hi, you would maybe be able to help me understand some things of the API.
I've a premium (free) AAA environ nement, i registered a webhook but since i used ngrok, the serverurl changed so i had the error :
So i tried to remove my webhook (and create it back) and I got this error when i try to remove it :
Using :
or just :
I wanted a way to "kill" my webhook at every start because i use ngrok (free) and my serverURL changes sometimes.
Thank you