Zombie user subscriptions?

webhooks

#1

I am seeing nothing on my callback endpoint for a user account subscribed to a valid webhook ID.

The callback endpoint is fine - if I ping a JSON request over in Postman, it hits the server and returns a 200. Then I see that request in the logs (its using Amazon API Gateway and Lambda so logs are very comprehensive).

When I query https://api.twitter.com/1.1/account_activity/webhooks.json using a valid user OAuth token for the user in question (also the owner of the app), I get

[
  {
    "id": "866272447053606913",
    "url": "https://webhooks.tuunio.com/v1/beta/webhook/twitter",
    "valid": true,
    "created_timestamp": "1495370420597"
  }
]

If I then query https://api.twitter.com/1.1/account_activity/webhooks/866272447053606913/subscriptions.json with the same OAuth token, I get a 204 response, which shows the user is subscribed. But no events ever hit the callback endpoint if this user sends a message.

Another user subscribed to the same webhook is working perfectly fine. If I receive a message from this other user, the callback is made and the event shows up. But if I send to the other user, nothing.

I’m wondering if this is because the user account in question was subscribed to a different webhook ID whose configuration has now been deleted (this is possible as we have two registered apps). There is thus no way to unsubscribe the user from the dead one as the DELETE endpoint gives a 404.

I’m wondering how I can debug this further - any ideas? Is there any way to just clear out all subscriptions for a user?


#2

Hi @SteveJonesGtr,

Did you perhaps create a webhook config with a URL, delete it, and then create a new one? It is possible that a user is subscribed to a deleted webhook config, but you should be able to delete it if you have the old webhook config ID. It’s a case the team here is looking at addressing. This is not the exact circumstance you describe, but maybe it’s helpful.


#3

Hi @joncipriano - that’s exactly what happened. Unfortunately I don’t have the old config ID. If there is an update for dealing with this case scenario, please let me know. Thanks.