Best answer

Webhook URL Validation

  • 21 December 2021
  • 5 replies
  • 204 views

Hi Team, 

We are trying to build a zapier app where we want to use Rest Hook mechanism to fire the triggers. Here the challenge we are facing is that our Backend System, by design, validates the webhook Url provided to its subscribe API. To validate the webhook URL our backend does the following on receiving the subscribe API call:

  1. Generates a random token
  2. Sets this token against a custom key in header, say “Validation-Token”
  3. Calls the webhook URL with above request header
  4. Expects a 200 response and the same token in the response header.

You can also refer the official documentation here: https://ringcentral-quickstart.readthedocs.io/en/latest/webhooks/

 

To achieve the above contract, we will require to alter the webhook output/response. But I don’t see any way to do this in zapier documentation. For reference, I can see below kind of response being returned by zapier webhook url

{
"id": "6dc1225c-6de1-46ea-8794-e2d4960fc62a",
"request_id": "61b88ed5-f683-4a70-aa0b-16ee7218bc40",
"attempt": "61b88ed5-f683-4a70-aa0b-16ee7218bc40",
"status": "success"
}

 

I can see this problem being faced by many app developers as many backend systems incorporate this kind of validation in their subscribe API, like below:

https://community.zapier.com/general-questions-3/connecting-with-kaizala-s-webhooks-692?postid=3170#post3170
https://stackoverflow.com/questions/38467286/zapier-modification-of-webhook-listener-http-response

 

Please confirm if zapier provides this capability to alter webhook output/response. Also, suggest if there is any way around for this kind of integration.

 

Regards,

pryrnjn

 

 

icon

Best answer by Zane 22 December 2021, 15:59

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

5 replies

@ikbelkirasan Can you help here?

Userlevel 7
Badge +11

Hi @pryrnjn.rc - Unfortunately, it's not possible to change the webhook response because the default response is sent before the trigger's handler function is called. Thus, it's not possible to implement webhooks validation scenarios.

Userlevel 7
Badge +9

Thanks for the feedback. I’m trying to track known instances of this issue to understand demand in the community and to survey all the different ways this use case is implemented by APIs. I’ve added these APIs to our list. To those reading, if you’re running into this issue, please share details.

Hi @Zane, I thank you for the response. Can we conclude from @ikbelkirasan’s and your response that currently there is no way to integrate the use-case presented here i.e, Ringcentral webhooks?
If yes, can you also help us with the tentative timelines for supporting this, if possible?

Userlevel 7
Badge +9

You’d need to implement the trigger as a polling trigger rather than a hook-based trigger. It’s not as nice of an implementation as a rest hook, but it’ll accomplish the same job for the user. 

 

We don’t have a timeline or definitive plan to add support for challenge responses in the HTTP message consumption handler at this point.