I’m relatively new to the HubSpot API, but in general, I’ve found it pretty easy to use. I’ve built an internal JS library that makes authentication transparent and method calls super easy. Our HubSpot (HS) integration is a one-off integration and specific to our internal use to better understand how our customers are using our product and how we can better serve them.
Right now, we have Oauth flow and hapi options in our HS library but as I read on the forums, the OAuth options are pretty much a non-starter for us since we are updating in response to our customer’s interaction with our app (i.e. server-side, like a batch process) when a HubSpot user may not be logged in and OAuth requires a user to be at a web browser to authorize the app. So far this hasn’t been an issue since we can just use a hapi key and everything works fine.
The problem is we have been integrating custom timeline events (Imagine an event like: Customer X made a purchase for $YYY dollars). We can create the custom event types, define their properties, etc. No problem. The issue comes in creating the event for the contact. Creating/Updating a timeline event requires OAuth. For our use case, this seems problematic. About the only solution I see is to queue up all the timeline events and blast HubSpot when a HS user goes online and we can get a valid OAuth token. Then again, I could be missing something obvious or just thinking about the API in the wrong way. (Very possible it is “user” error.)
Any ideas? I’ve read the API docs multiple times and searched these forums and I’ve not been able to find anything to address this issue. We are very close to getting this to work, but this authentication step is blocking us.