Question

Validate Rest Hook Subscription

  • 21 July 2023
  • 0 replies
  • 31 views

Badge

Hi there,

 

I’m attempting to set up a few rest hook triggers that require hook validation. I can see from a few previous posts/replies from @Zane & @ikbelkirasan that this isn’t typically possible, but the service I’m trying to work with (Keap) does support a delayed validation so I’m wondering if can be implemented in the perform.

The hook subscribe response comes back as:

{
"eventKey": "string",
"hookUrl": "string",
"key": "string",
"status": "Unverified"
}

With Header: X-Hook-Secret and a verification code as its value. Per their API reference, they say to either verify with the initial response (which I know from your previous replies is asynchronous and not possible) or to use their delayed verification endpoint:

POST to /v1/hooks/{bundle.subscribeData.key}/delayedVerify with the same X-Hook-Secret Header value and code pair.  (ref: https://developer.infusionsoft.com/docs/rest/#tag/REST-Hooks/operation/verify_a_hook_subscription_delayed).

Is this possible to implement in the perform? I’m not an expert so I don’t know how to access the header info in the subscribe data bundle or if it’s even possible, or if it’s allowed to make a separate request in the perform, etc.

Would really love to be able to implement some rest hooks for our needs, so any advice is much appreciated!


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