<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Unable to validate signature on workflow webhook request in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Unable-to-validate-signature-on-workflow-webhook-request/m-p/857707#M67862</link>
    <description>&lt;P&gt;Thank you, that did it for me. I was unaware of the beta program for using private apps in workflow webhooks.&amp;nbsp; Once I enrolled I was able to see the secret key, and successfully use it to verify the webhook signature.&lt;/P&gt;</description>
    <pubDate>Sun, 01 Oct 2023 04:34:33 GMT</pubDate>
    <dc:creator>Paul-Harapiak</dc:creator>
    <dc:date>2023-10-01T04:34:33Z</dc:date>
    <item>
      <title>Unable to validate signature on workflow webhook request</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Unable-to-validate-signature-on-workflow-webhook-request/m-p/856255#M67779</link>
      <description>&lt;P&gt;I've been through the docs, the other questions posted here, and I'm still unable to discover what I'm doing wrong. I have created a private app (id=2086776)&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;On my workflow's webhook definition, I've specified "Include request signature in header", and specified the id of my app&lt;/LI&gt;&lt;LI&gt;I'm using the "Test" button on the webhook editor pane, and ngrok to get to my local server.&lt;/LI&gt;&lt;LI&gt;the request comes to my server with a version header "v2", and&amp;nbsp; both x-hubspot-signature and x-hubspot-signature-v3 values.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;I'm calling the Hubspot Nodejs SDK method Signature.isValid(), with these values:&lt;BR /&gt;&lt;UL&gt;&lt;LI&gt;{&lt;BR /&gt;clientSecret: 'pat-na1-24***my private app access key',&lt;BR /&gt;method: 'POST',&lt;BR /&gt;requestBody: '{"email":"ph@test.com","phone":"+2223334444","orgType":"Carrier","lastName":"Hara","firstName":"Paul","companyName":"Sumac"}',&lt;BR /&gt;signature: 'c174e6ffe4910dbbfe366a3c2afd499ef0c70e1c24824d317a1d1e81aa6c713f',&lt;BR /&gt;signatureVersion: 'v2',&lt;BR /&gt;timestamp: 1695833200131,&lt;BR /&gt;url: '&lt;A href="https://6e49-199-91-115-68.ngrok-free.app/demo-api/users/create-demo-user" target="_blank" rel="noopener"&gt;https://6e49-199-91-115-68.ngrok-free.app/demo-api/users/create-demo-user&lt;/A&gt;'&lt;BR /&gt;}&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Can you spot my error?&lt;BR /&gt;&lt;BR /&gt;More info:&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I've also tried to verify the v3 signature, using the whole url, and just the "/demo-api/users/create-demo-user" part, but got no match&lt;/LI&gt;&lt;LI&gt;I have tried Signature.getSignature() with the above values, and get a different result, but if I pass that result into Signature.isValid, I get a passing result. (for both v2 and v3)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I'm wondering if I've misunderstood the use of private app keys and how they are used to generate the signature on the hubspot side.&lt;BR /&gt;&lt;BR /&gt;The app number I've supplied for the webhook config matches my private app, and I've copied the&amp;nbsp;Access token from my private app to use on my server as the clientSecret.&amp;nbsp; (I've noticed an oddity: If I drop a couple digits off the "Hubspot App Id" value in the webhook config screen, and test, I don't get an error, and I get a different signature.)&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2023 17:21:27 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Unable-to-validate-signature-on-workflow-webhook-request/m-p/856255#M67779</guid>
      <dc:creator>Paul-Harapiak</dc:creator>
      <dc:date>2023-09-27T17:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to validate signature on workflow webhook request</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Unable-to-validate-signature-on-workflow-webhook-request/m-p/857026#M67826</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/638590"&gt;@Paul-Harapiak&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; I did a bit of testing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A few questions:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Have you opted your user or the entire portal into this beta?&amp;nbsp;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CleanShot 2023-09-28 at 16.18.29.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/100080iC6CE6E32D203BA35/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CleanShot 2023-09-28 at 16.18.29.png" alt="CleanShot 2023-09-28 at 16.18.29.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;Once opted in, when you navigate to Settings &amp;gt; Private Apps &amp;gt; Your App &amp;gt; the Auth tab, do you see both the Access token and Client secret options? &lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CleanShot 2023-09-28 at 16.25.20.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/100082iB9620ACC2489D4E6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CleanShot 2023-09-28 at 16.25.20.png" alt="CleanShot 2023-09-28 at 16.25.20.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;I ask because it looks like you've input your Access token and not the secret. I didn't have it in my portal until I opted myself in.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Talk soon! — Jaycee&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2023 22:29:13 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Unable-to-validate-signature-on-workflow-webhook-request/m-p/857026#M67826</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2023-09-28T22:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to validate signature on workflow webhook request</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Unable-to-validate-signature-on-workflow-webhook-request/m-p/857707#M67862</link>
      <description>&lt;P&gt;Thank you, that did it for me. I was unaware of the beta program for using private apps in workflow webhooks.&amp;nbsp; Once I enrolled I was able to see the secret key, and successfully use it to verify the webhook signature.&lt;/P&gt;</description>
      <pubDate>Sun, 01 Oct 2023 04:34:33 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Unable-to-validate-signature-on-workflow-webhook-request/m-p/857707#M67862</guid>
      <dc:creator>Paul-Harapiak</dc:creator>
      <dc:date>2023-10-01T04:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to validate signature on workflow webhook request</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Unable-to-validate-signature-on-workflow-webhook-request/m-p/858169#M67881</link>
      <description>&lt;P&gt;Amazing! Thanks for letting us know — Jaycee&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 14:17:41 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Unable-to-validate-signature-on-workflow-webhook-request/m-p/858169#M67881</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2023-10-02T14:17:41Z</dc:date>
    </item>
  </channel>
</rss>

