To register Webhooks which tokens are to be used?

contacts

#1

I want to register webhooks for a user who wants to integrate his hubspot account with our application.
I get the Oauth2 tokens when a user authorize his hubspot account, then i want to register a webhook for that contact property changes.For making a request to register the webhook what tokens are to be used and it is not clearly mentioned in the api documentation. I am quite confused. Please someone help me out.


#2

@Piyush_Sinha You can create the webhook in a dev portal. Once you have it created you can use the OAuth spread out here as an example on how to install it to the portal you want it to listen in on.


#3

No, I want to create the webhook using API call.Is it possible for me to
register the webhook for my customer as it is done in Hubspot zapier
integration.


#4

I have the user access token stored with me and I have the developer hai
key. How to use these both to register the webhook for him.


#5

@Piyush_Sinha In order to register it you need to “install” it to their portal. If you go to your dev portal and open up the app that you created the webhook for on the bottom left it will show you how many portals your app is installed on.


#6

Ok.Is there anyway I can install webhook on their portal?


#7

@Piyush_Sinha Do you have a dev portal? You have to add the webhook to an “app” then you can install the app to their portal. Assuming you have a login to their portal.


#8

Yes I have a developer portal. I added the webhook subscription to my app.
Now for eg. Some person is using my app and he authorised his hubspot
portal using Oauth2. I have his access token secrets.Now I want to register
webhook for contact property changes for his account using this API call.<
https://API.hubapi.com/webhooks/V1/appId/subscriptions>
Will I be able to do that?


#9

@Piyush_Sinha Yes you have to install the app to his portal now.


#10

thanks @pmanca issue is resolved.