Hi,
I want to create an app for user data sync between hubspot and my site.
So I created a subscription with 3 properties (company, phone, skype) that will fire on “contact.propertyChange”.
Now I’m testing with “requestcatcher.com” and when I hit the test button everything works fine, but when I really change something in my CRM nothing happens..
Please help
Hi @MimonDev,
Can you check to ensure the webhooks are active, By default when you create webhook subscriptions they’re paused and must be activated from within the UI.
Regards,
Jack
Hi @MimonDev,
Do you mind sharing the specific application ID so I can take a look in more detail?
Regards,
Jack
Hi @jackcoldrick,
Sure here’s my app id: 207228
Hi @MimonDev,
Thanks for sending that through to me. I’ve taken a look at the app settings and all does seem fine. I was unable to find a portal the app is actually installed in however. Do you have the HubID of the portal you have installed the application?
All going to plan when the properties you subscribe to are updated it should notify your webhook.
Regards,
Jack
Hi @jackcoldrick,
Sorry for the misunderstanding, when you say Portal you mean my CRM?
I’m thinking that I don’t understand the entire process of the webhook flow…
Can you explain to me how to install my app to Portal/CRM?
Here’s is my CRM Id: 3356037
Hi @MimonDev,
No problem at all. Let me explain…
Step 1: Create application and webhooks
Our Webhooks API lets you subscribe to changes occuring within a HubSpot portal. In order to utilize this API you are required to create a developer account and register the application within the developer account. You then setup your various subscriptions. This part you have completed.
Step 2: Install the application in a portal using oAuth
The next part is to install the app within the various portals you wish to listen for changes. This is done using oAuth. During this process you will connect to our auth server and be prompted to install the app in any of the hubspot portals you are a user in.
Once you approve you are redirected back to what is known as the “Redirect URI” and are granted an auth code. You then use this code to obtain an access and refresh token. Once you’ve gone through this entire process any portals that have installed your application will trigger the webhooks you’ve defined.
So the reason you are not seeing your webhooks firing is because they’re not actually being notified of any changes as the application needs to be installed within a HubSpot CRM via oAuth.
I hope this helps,
Jack
Hi @jackcoldrick,
I did half of the process, I did the redirect thing and got the code but now I’m stuck at obtaining the access and refresh token
I just don’t know from where to take the “grant_type” value to proceed forward
Hi @MimonDev,
What I would recommend is as soon as you do the redirect and obtain the auth code. You should immediately exchange that for an access/refresh token as per this endpoint:
You could do this within your application but seen as you are only relying on webhooks and presumably only want to extract data out of HubSpot you can simply use Postman REST Client to obtain this access/refresh token. For example you would do the following (if using Postman):
If successful an access token and refresh token is returned. If you were getting, posting, putting or deleting data in HubSpot with our APIs you would use the access token to authenticate your requests moving forward. The access token expires every 6 hours and you would then use the refresh token to obtain a new access token.
However as you are only using webhooks the access/refresh tokens are not necessary. You simply just need to obtain them in order to fully install the app and get your webhooks to function correctly.
I hope this helps.
Jack
@jackcoldrickThanks a lot for help it’s working now