TimelineAPI: "User id could not be resolved" (HTTP 400)
Hi,
I'm using the Timeline API right after getting an accessToken in order to create new event types. I get the following error:
StatusCodeError: 400 - {"status":"error","message":"User id could not be resolved","correlationId":"e08e83a0-020a-457e-895a-xxx","requestId":"fe5ecb959a986c41fe31e692c7xxx"}
I double checked and my API calls actually have my own User ID (from the developer dashboard where I found the HAPIKey). Is the User ID supposed to be the actually ID from the user who is connecting or my own developer user ID? I'm asking because the same API call works if connect with my own developer account. The documentation says otherwise. Can someone please help?
Thanks!
Edit: The app was private at first. I thought that was the issue but even with a new, public hubspot app, it didn't resolve the issue
TimelineAPI: "User id could not be resolved" (HTTP 400)
Hi @agraebe, yep that's what I'm looking into. I think the issue is that you're using an Oauth token. You wouldn't need to generate one for this action. Per these docs: https://developers.hubspot.com/docs/methods/timeline/create-event-type, you should just use your developer Api key and your user id. You'd grab that info from this page by clicking "Get HAPIkey". then make a request like so:
{
"name":"New Event Type",
"applicationId":"186659",
"objectType":"CONTACT",
"headerTemplate":"# Title for event {{id}}\nThis is an event for {{objectType}}",
"detailTemplate":"This event happened on {{#formatDate timestamp}}{{/formatDate}}"
}
TimelineAPI: "User id could not be resolved" (HTTP 400)
Here is my app Id: 186659.
I'm going to change my implementation based on the learning that I can just create the templates once. Makes it much easier. However, the error seems to be unrelated. Maybe you could see what might be the cause?
TimelineAPI: "User id could not be resolved" (HTTP 400)
I edited the comment above - is that enough? I can also get you the details through DM if that helps.
I saw the UI feature, too. Does that mean I have to create the templates only one time and for my developer account and not for every user who's connecting?
TimelineAPI: "User id could not be resolved" (HTTP 400)
@Connor_Barley I was mistaken - the action did not resolve my issue. I thought for a minute it did but it's still the same. Can someone from HubSpot help? Here are more details:
The API response:
{
"status": "error",
"message": "User id could not be resolved",
"correlationId": "1e21af7d-69c9-4c77-8f42-xxx",
"requestId": "2db4cc66071898dc03d14aexxx"
}