How to see if a webhook is expired?

Hello,

How can I see if a webhook is expired?
I know if it is, I need to delete it and then re-create it, but first I need to know of course …

The only way I know now, is because the customer let me know that files aren’t coming trough to our app anymore …

Hi Peter,

Webhooks normally don’t expire, the only time this happens is when the event cannot be posted to your listening URL:

When the endpoint doesn’t reply with a 2xx code, the post will be retried with an exponential back-off over a total duration of ~48 hours. If after this time the endpoint still doesn’t reply with a 2xx code, the webhook subscription will be marked as expired (disabled). Also note that an expired webhook subscription can’t be revived, only deleted. To restore its functionality, the subscription will need to be re-created anew.

Is it possible that the https URL that was registered with the webhook could not be reached?

Keep in mind that the webhook is linked to the authorized user, if you still have the access_token for that customer, you can check which webhooks are currently active using this endpoint:

GET /v4/f/{root_firm_id}/companies/{company_id}/webhooks

Does this provide you with sufficient information?

Hello Jelle,

Thanks for the quick response.

With that url I only get the active webhooks?
How do I know which webhook to delete?
Or is there a field which indicates the status of the webhook?

Is there somewhere where I can see what information I can expect, would be handy :slight_smile:

Hi Peter,

I’ve noticed that the response on the GET webhooks does indeed not indicate the status of the webhook subscription. For now you’ll have to create a ticket with our support (api@silverfin.com) to request an extract from our database with expired webhooks for your API application.

I’ll create a feature request to add an extra parameter to the webhook GET response to indicate whether a webhook is still active or expired.

Hi Jelle,

You already have a parameter to indicate this in the GET webhooks endpoint => ‘expired_at’.
I had the same problem as Peter a couple of days ago and I noticed that the corresponding webhook had a date-value in this field. I then re-created it and now it seems fine.

1 Like

Thanks, I 've sent a mail.

@peterdv I’ve just revisited the endpoint, and created a webhook in our database.
@Maxime.Lambrechts is absolutely right and there is a parameter now that indicates the expired_at date:

example:

GET https://{{base_url}}/api/v4/f/:root_firm_id/companies/:company_id/webhooks?page=1&per_page=10

[
{
“id”: 58611,
“url”: “https://enaa12r9saairbk.m.pipedream.net”,
“events”: [
“period.created”
],
“user_id”: 27822,
“expired_at”: null
}
]

1 Like