APIs & Integrations

Peta_APB
投稿者 | Gold Partner
投稿者 | Gold Partner

Webhooks in Workflows - how to include the authorization header with my API key

解決

Hi all

 

I’m trying to build a workflow that sends a webhook to an external application (Stripe) using a GET method.

 

I feel I’m having trouble with one step. And I’ve been referring to the instructions here:

https://knowledge.hubspot.com/workflows/how-do-i-use-webhooks-with-hubspot-workflows#set-up-a-webhoo...

 

So my issue is that I’m experiencing a 401 error. Which I understand it’s not authenticating my request. So, I've used the following settings in my webhook:

 

  • I’ve selected GET method.
  • I’ve added my Stripe API Key as a secret.
  • I’ve selected API Key as the authentication type and selected my secret for my Stripe key.
  • I’ve selected Request header as the key location.


So even though I've selected request header as my key location, do I also need to add an additional query parameter to set the header? If so, exactly what values need to be set in the Key and Value fields so that it uses my secret and sets the authorization as bearer token?

 

Sorry if this is a dumb question, but I've tried:

Key = Authorization

Value = Bearer {StripeTestDataKey}

 

This isn't correct obviously so any help would be appreciated because I've tried many combinations.

 

I thought this would actually be quite easy as I actually have these already built in our Zapier account so I know the URL and the API key are correct, etc. I would love to resolve this one issue of authenticating the request so that I can simply bypass sending everything through Zapier.

And I should also explain that I’m not a developer so please be gentle, but I’ve searched through the Hubspot literature and simply cannot find the answer to this question anywhere and support aren't able to help me. 

So hopefully this is simple for someone to help me with.

Thank you.

Kind regards

Peta

0 いいね!
1件の承認済みベストアンサー
Peta_APB
解決策
投稿者 | Gold Partner
投稿者 | Gold Partner

Webhooks in Workflows - how to include the authorization header with my API key

解決

If anyone is looking, I just noticed Hubspot just updated their article to include the information I was missing.

 

Peta_APB_0-1675653947914.png

 

 

 

Peta_APB_3-1675654332683.png

 

Peta_APB_5-1675654535376.png

 

 

 

 

元の投稿で解決策を見る

0 いいね!
4件の返信
Peta_APB
解決策
投稿者 | Gold Partner
投稿者 | Gold Partner

Webhooks in Workflows - how to include the authorization header with my API key

解決

If anyone is looking, I just noticed Hubspot just updated their article to include the information I was missing.

 

Peta_APB_0-1675653947914.png

 

 

 

Peta_APB_3-1675654332683.png

 

Peta_APB_5-1675654535376.png

 

 

 

 

0 いいね!
Jaycee_Lewis
コミュニティーマネージャー
コミュニティーマネージャー

Webhooks in Workflows - how to include the authorization header with my API key

解決

Hey, @Peta_APB 👋 Thank you so much for your question. Let's see if any of our brilliant community members have experience here — @Teun @LMeert @tominal, do you have any tips you can share with @Peta_APB?

 

Thank you! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 いいね!
tominal
ガイド役 | Solutions Partner
ガイド役 | Solutions Partner

Webhooks in Workflows - how to include the authorization header with my API key

解決

Hi @Peta_APB,

 

I am having trouble understanding your use case here. Webhooks are one-way requests sent by applications like HubSpot and Stripe for an application to react to.

 

If you are wanting to change something on Stripe's end, you would need to use some code to utilize their API. You can actually accomplish this using a custom code workflow action (HubSpot Enterprise), but you would need some Node.js experience.

 

Are you able to speak a little about your use case for us to better understand?

 

Regards,
-T


Thomas Johnson
Community Champion


Kahu Software LLC
A Texan HubSpot consulting firm
https://kahusoftware.com
0 いいね!
Peta_APB
投稿者 | Gold Partner
投稿者 | Gold Partner

Webhooks in Workflows - how to include the authorization header with my API key

解決

Hi @tominal thank you so much for your reply.

I have several use cases, but to keep it simple, I think all I’m struggling with is understanding how to configure my webhook to include my Stripe API key as Authorization: Bearer {my_Stripe_API_key}.

In terms of use cases, we actually have quite a few and in fact, I already have most of this built in Zapier using custom webhooks, so I am comfortable with that and comfortable with the Stripe API documentation, but I just am struggling with how to configure webhooks in Hubspot and Hubspot support have directed me here.

I actually shot a quick screen recording to explain my issue better (I feel like I’m just missing pieces of information):

 

https://www.loom.com/share/4e4a6a27434c47b09228a6b6e6efe244

 

 

I hope this adds better clarification to my original question.

I look forward to hearing from you soon.


Warm regards

Peta

0 いいね!