Can't use Timeline API



Hey there,

I’ve been trying to use the Timeline API to retrieve event information about my contacts. The first thing I tried to do was get all the event types, so I followed the instructions in I provided the hapi key and for the application ID I used the “Hub ID” that shows up on Hubspot. However, this gave me the error “UserId not provided in request”.

I looked up the error on the forum and someone said OAuth 2.0 was required, but that was for creating an event type. Either way, I got a developer account and an access token and tried again. This time, I got the error

Can anyone tell me what I’m doing wrong here? I had no issues using the Companies and Contacts APIs.

Thanks in advance


Hi @Pedro

The endpoint documented on that page will only work with a developer HAPIkey that you would get from a developer account.

The Timeline API works as part of an OAuth app, where the app would be created and set up through a developer account. The Developer HAPIkey you’d get from that developer account can be used to update some of the settings for the apps you’d create, including creating or updating timeline event types for apps you’ve created. There are some other details for that here:

You won’t be able to create timeline event types without first creating an app, and you’d only be able to create event types for an app using the Developer HAPIkey from the developer portal that the app was created in.

Also, as a final note, the Timeline API is mostly read-only. It is possible to retrieve events, but only events that your integration has previously created.