Timeline API create event error UserId



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?


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.


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


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!