Using Webhook / Deal Property Changed - Deal Stage
I agree, please make this easier! I’m on my third day, I have the integration installed in a test portal, everything looks good, but it’s not posting to my webhook and I’m still trying to figure out why. This process is a series of frustrating puzzles. If you can’t make this easier, please show some source code like everyone else does!
I don’t understand why redirect_uri is hubspot.com. Why would ?code=xxx be sent to hubspot.com? How does this get ME the code that I need to get the access token? Wouldn’t the redirect_uri be my own page where I can use the code to get the access token?
Using Webhook / Deal Property Changed - Deal Stage
thanks for all the assistance here I got this working, but holy smokes add a simple place to add their own webhooks for a portal… this is super common practice that shouldn’t require someone to go down the developer path
Using Webhook / Deal Property Changed - Deal Stage
dealstage. It needs to be the internal name of the property for future reference. You can get the internal name under the settings for that object so deal settings in this case.
Using Webhook / Deal Property Changed - Deal Stage
I appreciate the research done on your part. Looks like I was incorrect in that post. I must have been spinning up a image quicker than I should have and didn’t take the proper time to think through what I was typing in the box as an example. My apologies and thank you for catching it.
Using Webhook / Deal Property Changed - Deal Stage
No, I just went through the process myself to make sure it was working and I just got back a 200 with the access token and the refresh token. Do you see the install now?
Using Webhook / Deal Property Changed - Deal Stage
Even if you don’t get to the same grant screen you should still be able to choose which portal you want to generate the code for. I would double check to make sure your Client ID and secret are correct.
Using Webhook / Deal Property Changed - Deal Stage
Is that a fresh code you are using? I would try and run both steps, one right after the other. The only time i’ve ever received that error is when I have an old code as they expire.
Using Webhook / Deal Property Changed - Deal Stage
i’m still not following how the nodeJS code and/or passport fit into the equation.
to be clear, i AM getting the “authorization” dialog when i use the URL indicated in the link you sent entitled “Initiate an Integration with Oauth 2.0”
let me see if i can explain better what’s happening.
so this tells me that i have already authorized the app for this portal.
if i create a new portal, then i have to start all over again, but once it’s been authorized, i never get the “grant access” button again for the same app in the same portal. as i have mentioned before, i still don’t see how to “revoke access” once it’s been granted.
either way, when i go back to the developer portal, i’m still not seeing any installs.
so again, i’m not following what on earth the nodeJS code does for me.
the only line of code that seems to do anything is this one: User.findOrCreate({ email: json_response.user, hub_id:json_response.hub_id, access_token:accessToken, refresh_token: refreshToken }, function (err, user,created) { return done(err, user); }
i don’t see any documentation on the hubspot api page referencing the User.findOrCreate function either.
i’m guessing that this is some internal function that somehow adds the email address of the USER into the APP somehow and pairs them up in some way.
if that’s the case, isn’t there some REST URL i can use instead of trying to implement this nodeJS code? or maybe send it back to hubspot using postman or something like that?
{
"status": "error",
"message": "The access token must have the correct format",
"correlationId": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"requestId": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
if i then try to use POST via postman on the same URL, but attempt to populate the JSON and send as a RAW Body, something like this: