Best answer

How to return an custom output with status code in Zapier rest hook perform?

  • 29 December 2020
  • 2 replies
  • 560 views

Userlevel 1

I am using Zapier web builder to create a Zapier APP. I have rest hooks, when I subscribing for a hook API sends a verification challenge code, this comes in the perform

Here is the content that I am receiving in query string :

hub.mode=subscribe&hub.challenge=97890257&hub.verify_token=12345

Zapier returning below back to api:

{"id": "732a8cfc-1dcc-4b54-9a55-7d21e0858ad6", "request_id": "5feb0139-a858-4fbc-b32d-47e13ff472a0", "attempt": "5feb0139-a858-4fbc-b32d-47e13ff472a0", "status": "success"}

I want to modify the return response and status code.

Please advise?

Thanks

icon

Best answer by ikbelkirasan 29 December 2020, 13:37

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.

2 replies

Userlevel 7
Badge +10

Tagging @ikbelkirasan for this one.

Userlevel 7
Badge +12

@codetycon - As far as I understand it, when a new webhook request is received, Zapier would automatically respond with a 200 response like the one shown above before passing the request content to the app. Unfortunately, it’s not possible to change this behavior. Therefore, it is not possible to support webhooks that need verification like yours.

One way around it would be a proxy/middleware that handles the verification part and forwards any other requests to the actual Zapier webhook URL. You might want to take a look at Cloudflare Workers which I’ve personally used to implement this kind of integration.