Can not create subscription using webhook post api

Hi, Best CRM community,

I was trying to get all webhook subscription (webhooks/v3/{appId}/subscriptions) using OAuth authentication and I was getting the below error but This api is working fine with Developer Api Key.

I also checked /crm/v3/objects/contacts endpoint with Access-Token, and it is working fine. Not sure why I’m getting an error with webhook APIs.

“{\“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\”:\“uuid\”,\“links\”:{\“support\”:\”[https://help.hubspot.com/\\](https://help.hubspot.com/\)“,\“forum\”:\”[https://community.hubspot.com/t5/APIs-Integrations/bd-p/integrations\\](https://community.hubspot.com/t5/APIs-Integrations/bd-p/integrations\)“},\“category\”:\“MISSING_SCOPES\”}”

Please help me to get it to work.

@Teun @dennisedson @Kevin-C

Hi, @developer_crazy. Thanks for the question.

In a roundabout way, you’ve answered your question.

The Webhook API endpoint you are using only offers Developer API as an auth option. We can see this here:

This is because Webhooks are set in the app, not in an individual account “Webhooks are set up for a HubSpot app, not individual accounts. Any account that install your app by going through the OAuth flow will be subscribed to its webhook subscriptions.”

We can see the difference in the Companies API, where OAuth and Private apps are auth options but not your Developer API Key.

To put it another way, to use the Webhooks API endpoint you mentioned, you have to use your Developer API Key. There isn’t a way around that.

I hope this helps get you moving forward.

Best,

Jaycee

Gotcha! Thanks for confirming @Jaycee_Lewis. I was able to access webhook APIs with the developer API key but I was wondering about OAuth. It helped. :slightly_smiling_face: