APIs & Integrations

pinch
Participant

Webhook Not Working

SOLVE

I would like to get alerts when a contact firstname changes.

Rather than polling the api, I would like to use a webhook to send me the data when it changes.

I went to the developer console and created an app.

I then subscribed to the trigger for contacts having firstname changes and pointed that to my url.

As for that url, I created a very simple web service that takes in the resulting json thats supposedly received from the webhook and sends me that data as an email.

Problem is that the console shows me just 0's, no trigger action whatsoever. Am i missing something? Does my web api have to do something else? Can you provide detailed instructions?

When i tested the subscription it worked...interestingly the data was null though? So it may be failing...what needs to be done?

0 Upvotes
2 Accepted solutions
Derek_Gervais
Solution
HubSpot Alumni
HubSpot Alumni

Webhook Not Working

SOLVE

Hi @pharr,

Did you install your app to your production account? Before any webhook notifications are sent, your app must be added to your HubSpot account. You can check whether or not it's installed by navigating to the 'Integrations' page of your production HubSpot account.

If it hasn't yet been installed, you can accomplish that by completing the OAuth flow described in the following developer doc:

View solution in original post

0 Upvotes
pinch
Solution
Participant

Webhook Not Working

SOLVE

Thank you very much for all you help!

View solution in original post

4 Replies 4
pinch
Solution
Participant

Webhook Not Working

SOLVE

Thank you very much for all you help!

Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Webhook Not Working

SOLVE

Hi @pharr,

If you're using the access tokens to make requests to the HubSpot API, you need to refresh the tokens when they expire every 6 hours. However, if you're only installing your app in order to receive webhooks, you can ignore the access token(s) and just listen for the webhook notifications.

HubSpot's authentication matches the OAuth 2 spec; for more info on OAuth 2, check out the following info:

Authorization Code Request - OAuth 2.0 Servers

The authorization code grant is used when an application exchanges an authorization code for an access token. After the user returns to the application

0 Upvotes
Derek_Gervais
Solution
HubSpot Alumni
HubSpot Alumni

Webhook Not Working

SOLVE

Hi @pharr,

Did you install your app to your production account? Before any webhook notifications are sent, your app must be added to your HubSpot account. You can check whether or not it's installed by navigating to the 'Integrations' page of your production HubSpot account.

If it hasn't yet been installed, you can accomplish that by completing the OAuth flow described in the following developer doc:

0 Upvotes
pinch
Participant

Webhook Not Working

SOLVE

Thanks so much for your help, its all set up and working...one last point i see that access tokens expire every 6 hours, and id need to send a refresh token to keep it alive... is this automatically refreshed or i have to manually send refresh requests every 6 hours?!

0 Upvotes