Skip to main content
Best answer

Webhook URL Validation

  • December 21, 2021
  • 5 replies
  • 1184 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

 

 

Best answer by ZaneBest answer by Zane

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. 

View original
Did this topic help you find an answer to your question?
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

  • Author
  • Beginner
  • 2 replies
  • December 21, 2021

@ikbelkirasan Can you help here?


ikbelkirasan
Forum|alt.badge.img+12
  • Zapier Expert
  • 555 replies
  • December 21, 2021

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.


Forum|alt.badge.img+9
  • Zapier Staff
  • 331 replies
  • December 21, 2021

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.


  • Author
  • Beginner
  • 2 replies
  • December 21, 2021

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?


Forum|alt.badge.img+9
  • Zapier Staff
  • 331 replies
  • Answer
  • December 22, 2021

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.