APIs & Integrations

Bastiaan1
Member

Timeline API create event error UserId

Hi,

I find that if I try to create a timeline event I get the following error:
{"status":"error","message":"UserId not provided in request","correlationId":"151ed141-8fb9-4c08-86c2-608a561fde41","requestId":"1ab5705abe70fe4fc2c9d3999eaa33ed"}

I cannot find any references to ‘UserId’ in the API documentation. Also, I am using the Hapikey directly from our portal instead of an acces token via Oauth. Can someone explain what the missing parameter is here?

0 Upvotes
3 Replies 3
Dadams
HubSpot Employee
HubSpot Employee

Timeline API create event error UserId

Hi @Bastiaan

You must use an OAuth access token to create a new timeline event, as hapikeys cannot be used for creating an event. You’ll need to authorize your portal with the app that your event types were created for, then use the OAuth access token to create the events in the portal.

I’ll get the documentation updated to make it more clear that hapikeys are not supported for creating events.

0 Upvotes
Not applicable

Timeline API create event error UserId

I ran into the same issue as @Bastiaan. If we could get an example of OAuth with the Timeline API that’d be very helpful. Thanks!

0 Upvotes
Bastiaan1
Member

Timeline API create event error UserId

Thanks for the quick reply! Maybe also update the error message to indicate that OAuth is needed.

0 Upvotes