Unable to create a webhook following the documentation

I’m trying to create a webhook to listen to changes in a company property. I am trying to follow the documentation in this link Accounts Dashboard | HubSpot however it seems it is outdated.

At first, it is not possible to view application ID in the UI, but at least I’m able to see it in the URL. Then, according to the documentation I need the crm.objects.contacts.read scope, which the app already has, along with crm.objects.companies.read . However, when I call the PUT https://api.hubapi.com/webhooks/v3/{appId}/settings with the following payload:

{
 "throttling": {
 "period": "SECONDLY",
 "maxConcurrentRequests": 10
 },
 "targetUrl": "https://www.example.com/hubspot/target"
}

I get an error indicating that I don’t have enough scopes:

{
	"status": "error",
	"message": "The scope needed for this API call isn't available for public use. If you have questions, contact support or post in our developer forum.",
	"correlationId": "99882e34-9a97-403d-96c9-c06102cdd344",
	"links": {
		"support": "https://help.hubspot.com/",
		"forum": "https://community.hubspot.com/t5/APIs-Integrations/bd-p/integrations"
	},
	"category": "MISSING_SCOPES"
}

What are the scopes I’m missing to make that call, and why those don’t appear in the documentation? Also I cannot see any visual UI or menu option for configuring webhooks, that’s why I’m doing it via API.

Hi, @ocalderon :waving_hand: Based on your description, it sounds like you are using a Private App. Is that correct? I ask because you mentioned “At first, it is not possible to view application ID in the UI” which is true for Private Apps. You need to have a Developer test account and create your app there first.

Webhooks are set up for a HubSpot app, not individual accounts. Meaning, they do not work with Private Apps.

An overview of the needed steps:

  • create an app in a Developer test account

  • create your subscriptions
  • get the OAuth flow set up
  • then you can install the app in a specific portal and receive data from any webhook subscriptions you’ve created for your app

You can confirm you are in the correct account type by looking for the Developer test account banner in the upper left-hand corner. The banner is persistent in Developer test account. This is where you can find any apps you’ve created and access the needed info, such as the App ID.

If it’s helpful, we have an OAuth Quickstart Guide that covers all the needed steps to get set up.

Best,

Jaycee

Hi Jaycee, thanks for your reply! If I understand correctly, with a sandbox account I cannot create/configure webhooks?