Cannot manage Webhooks settings via the API

Hello! I’m trying to manage Webhook settings using the API by following this guide. I thought I would start simple and try to call

GET

/webhooks/v3/{appId}/settings

to retrieve the settings.

I get the error (emphasis mine):

Authentication credentials not found. This API supports both API Key and OAuth 2.0 authentication and you can find more details at Accounts Dashboard | HubSpot

So I try to use OAuth authentication and I get:

This API can’t be called using an OAuth access token. A valid developer API key must be provided in the `hapikey` query parameter, and a valid `appId` must be provided in the API request.

The error has a helpful link pointing me where to create a Developer API Key. Problem is, when I go there, I see this:

Private apps are replacing API keys. Private apps use secure access tokens instead of API keys.

It won’t let me create a developer API key. I tried to create a private app and use the AccessToken in the hapikey query parameter, but that didn’t work either.

The API key provided is invalid. View or manage your API key here: HubSpot Login and Sign in

I click the link and it takes me back to the Developer API Key page. So at this point, I’m completely stuck. It seems like the documentation are completely at odds with each other.

Hey, @haacked :waving_hand: Sorry you’ve been stuck in a frustration-loop with the documentation. Let me see if I can get you pointed in the right direction, and I’ll make a request to get the link to the Developer API key documentation linking folks to the correct document.

Here’s the correct link for “developer API key”.

Please note, Developer API keys are separate from HAPI keys and are not affected by the upcoming HAPI key sunset.

Here’s how to find your Developer API key for anyone else who bumps into the same issue:

  • Navigate to your App Developer Account. You can verify you’re in the right place by viewing the top banner, it will show “This is an app developer account”

  • From there, click the App tab > Get HubSpot API key

  • If we are working from the page example, you can input in the Developer API key field

From there, you should be good to go.

Thanks for the heads-up about the linked document being confusing, I’ll submit a request to get that updated.

Have fun building! — Jaycee

Thanks for the help! I think I was confused because I was logging into one of my test accounts and didn’t realize I was missing that banner at the top. I see the banner when I log into our company developer account.

Hi @Jaycee_Lewis, I followed all the instructions (as best as I could) but am still running into problems.

I logged into the correct Developer Account. Here’s our Apps page and you can see the “Get HubSpot API Key” button is there. Along with an app with App Id: 1079238.

I clicked the “Get HubSpot API Key” and created a new key.

I redacted most of the key, but left a few characters. I then went to the API Endpoint test page:

As you can see, I put in the Developer API Key as well as the appId. I clicked “Send Request” and got the error response in the above screenshot.

It just occurs to me that I may have a fundamental misunderstanding of how HubSpot Webhooks work. I assumed I need to install a webhook for each HubSpot organization that installs our HubSpot integration. But it seems like I only need to install it once for our application and it applies to all orgs that install our integration. Is that correct?

Hi, @haacked :waving_hand: You are correct. The webhook subscriptions will be set in your app. Then they will fire for each portal that installs your app.

Thank you for continuing to post your questions here :folded_hands:

Best,

Jaycee