Webhook API is not firing


#1

Hi,

I'm trying to create a webhook subscription, when I test from Test suscriptions is working fine (the webhook was sent.), but when I create a new company I did not get anything on my webapi app.

Thanks for your help,
Fernando.


#2

Hi @fjpampliega,

Have you installed your app in the portal you're testing in?


#3

Yes, I have installed it in localhost, but using ngrok tunnelling.
https://aa45978a.ngrok.io/api/HubSpot/HandlerNotification.

Thanks,
Fernando


#4

Hi Derek,

Just to comment you this test that I made.

https://app.hubspot.com/oauth/authorize?client_id=xxxxxxxxxxx&scope=contacts&redirect_uri=https://62371801.ngrok.io/home/test

After click grant access I got the exception below
https://62371801.ngrok.io/home/test?code=cfba2a6f-b645-4f3f-8d7b-c709b70a896b

On this method I will create the Access Token.

Many thanks for your advice.


#5

Hi @fjpampliega,

Can you send me a link to your developer portal and the test / Marketing/CRM portal in which you've installed the app so that I can do some troubleshooting?


#6

Hi - I'm having the same problem. It fires manually, but not when I perform the trigger action in Hubspot. I have installed the app successfully - "grant access" worked. What am I doing wrong?


#7

Hi @ainsley,

Can you send me a link to both your developer portal and your Marketing/CRM portal where the app is installed?


#8

Developer: https://app.hubspot.com/developer/4667411
Marketing/CRM: https://app.hubspot.com/reports-dashboard/2974240

Thanks!


#9

Hi @ainsley,

It looks like your app isn't completely installed in the Marketing/CRM portal you linked: https://app.hubspot.com/integrations-beta/2974240/your-integrations

You'll need to complete the OAuth installation process in order for webhook subscriptions to function correctly. Have you completed the steps in the 'Installing an app' document I linked above?


#10

Ok, so I've gotten as far as getting the code that was appended and I have the client ID and client secret

But this page

https://developers.hubspot.com/docs/methods/oauth2/get-access-and-refresh-tokens

doesn't tell me where to put these three things. I see a url (https://api.hubapi.com/oauth/v1/token), but...there's no actual action described. Do I visit this url from my browser? Put it into the webhook subscription interface somewhere? (I know neither of these are correct, but I can't think of any other options)


#11

Hi @ainsley,

You have to make a application/x-www-form-urlencoded POST request to that url, including that info specified in the doc. In theory, this would be done programmatically, but if you're just setting up webhooks you can do it manually via a rest client, like this:


#12

Hi Derek I'm having the same issue, not firing the web-hook when editing a contact, I have granted the permissions for my app with the following link:

https://app.hubspot.com/oauth/authorize?client_id=c6520127-1917-49a0-9b7e-44c78701e68f&scope=contacts&redirect_uri=https://0a896566.ngrok.io/

scopes on the app match so no issue, but "my app" doesn't appear on integrations however when I repeat the process the grant access screen doesn't appear, seems that works fine since I already granted the permissions / scopes

the issue is that following after these steps I'm not still able to get the event for the web hook, for whatever subscription that I have created,

Any Ideas?

EDIT:
I was missing a token refresh, after I followed this steps worked, question:
do I need to refresh the token every six hours?


#13

Hi @pedrommuller,

If you're using the token to make requests to the HubSpot API, yes you need to refresh the token every 6 hours. If you were just trying to complete the auth flow to enable webhook notifications, you do not need to refresh the access token.