FAQ: Which data should I encode when building a webhook listener (HMAC authentication)?

Comments

24 comments

  • Kumar Mouthik Tumuluri

    can you give clear step by step procedure of screenshots i tried this article but im not getting the result as 401

     

    https://docs.celigo.com/hc/en-us/community/posts/4409699690395-Construct-an-HMAC-request-via-Postman-to-send-test-requests-to-Celigo-webhooks

    0
  • Om Mishra

    Hi Kumar,

    We would like to understand how you encountered the error and what actions you took that led to this error.

    Thanks,
    Om Mishra

    0
  • Kumar Mouthik Tumuluri

    actually im trying HMAC authentication webhook for one of my clients

    i tried as the same procedure as in the link i posted 

    but im getting 401 error if any possibilities please help

     

    0
  • Om Mishra

    Hi Kumar,

    I just tried and it's working for me. Below are the steps I used to make it work.

    1. I created a webhook listener in IO and provided the necessary details. For the Key (secret) value, I used: "secret".

    2. I entered the POST public URL in Postman and used the script mentioned in the earlier post.

    3. In the above screenshot, I defined the HMAC variable using the same script I'm using in the Pre-request Script, as shown in the screenshot below.


    4. I received a 204 response code and was able to see the data in IO.



    Hope this helps.

    Thanks,
    Om Mishra

    0
  • Kumar Mouthik Tumuluri

    thanks Om MishraKathyana Queeman it is working fine through post man 

    one more last doubt how we will set this through celigo https like what we did in postman

    0
  • Kathyana Queeman Community moderator Technical Writer
    Engaged
    Celigo University Level 2: Seasoned

    Hi Kumar Mouthik Tumuluri

    Do you mean how to set this up through the integrator.io interface rather than through Postman? We have some instructions here: Set up a webhook listener. There's a section specifically on HMAC. 

    0
  • Om Mishra

    Hi Kumar,

    For testing, I have used "secret" as the secret value, which should also be entered in the Pre-request Script in Postman. This is the same value you will use when configuring your webhook in IO.


    Thanks,
    Om Mishra

    0
  • Kumar Mouthik Tumuluri

    How we will do that same thing in celigo platform through http

    0
  • Kumar Mouthik Tumuluri

    Thanks for Om Mishra for clarifying the doubt in postman

    0
  • Kumar Mouthik Tumuluri

    How can we achieve the same thing in celigo platform through http Om Mishra

     
    0
  • Kumar Mouthik Tumuluri

    Kathyana Queeman ya webhook listener is done working fine with the help of Om Mishra 

    but how do i set up http so i invoke webhook it from another flow 

    0
  • Kathyana Queeman Community moderator Technical Writer
    Engaged
    Celigo University Level 2: Seasoned

    Kumar Mouthik Tumuluri

    Do you want to invoke a webhook from another flow in integrator.io? I'm not sure about that. Webhooks send an HTTP POST message over the web in real-time to an endpoint when an event occurs in an application. When an event triggers a webhook request, the source application sends a message to a specified URL, and a webhook listener receives the message and then executes operations according to the message's content. 

    If you mean that you want an "event" (like a flow ending) in IO to trigger a webhook flow, that might be possible, but I'm not sure. Perhaps Om Mishra can help. I know you can daisy chain flows in integrator.io, but I'm not sure how much help that will be. 

    0
  • Kumar Mouthik Tumuluri

    Yes like you used pre requisite script right

    what type of settings need to be done in celigo Http in another flow to invoke the webhook

    Om Mishra Kathyana Queeman

    0
  • Kathyana Queeman Community moderator Technical Writer
    Engaged
    Celigo University Level 2: Seasoned

    Hi Kumar Mouthik Tumuluri

    Let me check on this and get back to you. I'll reach out when I have something concrete to share. Thanks! 

    0
  • Kathyana Queeman Community moderator Technical Writer
    Engaged
    Celigo University Level 2: Seasoned

    Hi Kumar Mouthik Tumuluri

    Here's a community article example that achieves what you're looking for. Thanks! 

    0
  • Kumar Mouthik Tumuluri

    i want http that calls hmac anyways i know that one 

    0
  • Kathyana Queeman Community moderator Technical Writer
    Engaged
    Celigo University Level 2: Seasoned

    Kumar Mouthik Tumuluri

    Does this solve your problem or are you looking for something else? 

    Thanks!

    0
  • Kumar Mouthik Tumuluri

    i want like how can we do the configuration of that hmac webhook settings in a http connector for invoking the hmac webhook connector , you showed the example of invoking through postman, i m researching for invoking hmac webhook through celigo connector for anypossibility

    0
  • Kumar Mouthik Tumuluri

    take your time no issues and post it here

    0
  • Kumar Mouthik Tumuluri

     Hi

    Kathyana Queeman 

    Om Mishra

    https://docs.celigo.com/hc/en-us/articles/360039326071-Handlebars-helper-reference#hmac this one can be used 

    since hmac converted values goes in header "test"

    can u refer this handle bar exp this looks this exp can be used in configuring http

    and please help me know how to send the values of HMAC webhook that u used in the above example 

    in following expression 

    into HTTP header

     

    {{hmac "algorithm" key "encoding" field keyEncoding}}
    0
  • Kumar Mouthik Tumuluri

    hi Om Mishra

    any clue on this setting of those credentials of hmac webhook in http/integrator.io of celigo in another flow for invoking hmac webhook

    0
  • Om Mishra

    Hi Kumar,

    Apologies for the delayed reply. The purpose of the Pre-request Script in Postman was to calculate an HMAC SHA-256 hash of the request data using 'test' as the secret key. It then encodes this HMAC value in Base64 format and saves the encoded string as an environment variable named "hmac" within Postman.

    For your HTTP requests, you can utilize the hmac value by incorporating the handlebar syntax as follows:

    {{hmac "sha256" "test" "base64" request.data}}

    This handlebar custom helper allows you to dynamically include the HMAC signature in your HTTP requests. For more details on how to use this custom helper, please refer to the provided document.

    I hope this explanation is helpful. Should you have any further questions, please don't hesitate to ask.

    Thanks,
    Om Mishra

    0
  • Kumar Mouthik Tumuluri

    Hi Om Mishra

    Thanks for the reply 

    please can you give ur full implementation of it in http along with connection of celigo

    if u dont mind as what you have provided  for postman

     

    Thanks

    kumar

    0
  • Kumar Mouthik Tumuluri

    hi Om Mishra

    Can you give  full implementation please with http in celigo

    0

Please sign in to leave a comment.