Timeline API "You do not have access to this application"

timeline

#1

I'm trying to push events through your Timeline API, but I'm running into technical problems.

  1. I've created an app with the client_id "xxx"

  2. I've created this URL to install the app: "xxx" and after selecting the right account, the app is correctly installed (I can verify this under https://app.hubspot.com/integrations-beta/xxx/your-integrations

I got this code: "xxx"

  1. I'm requesting an auth code:

POST [XXX)

And I successfully get this:
{
"refresh_token": "xxx",
"access_token": "xxx",
"expires_in": 21600
}

  1. Then I try to create a timeline event (I already created an event type with ID xxx that has the property "xxx".

PUT [xxx
Authorization: Bearer xxx
Content-Type: application/json
Body:
{
"id": "001-001001",
"eventTypeId": xxx,
"xxx": "Starter",
"utk": "xxx"
}

But I get this reply:
{
"status": "error",
"message": "You do not have access to this application"
"correlationId": "xxx",
"requestId": "xxx"
}


#3

Hi @Luke_Curry,

We chatted about this over Slack, but I'll post here for any other customers encountering similar issues.

Your customer used their Hub ID instead of their application-id when they called this endpoint.

The format of the request URL is https://api.hubapi.com/integrations/v1/:applicationā€id/timeline/event. Putting in the Hub ID instead of the correct application-id will trigger a "You do not have access to this application" error.


#4

I replaced the ID which made everything work. I added a quick header and detail template which also appear to be working fine.

One thing that doesn't work for me is that I send the event property "PaymentPlan" which I've mapped to the contact property "PaymentPlan". But when I fire the event, the contact property doesn't get updated.

This is my latest call (fired just now, got a 204 No Content):

PUT https://api.hubapi.com/integrations/v1/183341/timeline/event

{

"id": "001-001006",

"eventTypeId": 380749,

"PaymentPlan": "Growth",

"email": "martin.egerstrom@zooma.se"

}

You can see the event here: https://app.hubspot.com/contacts/5087120/contact/135051/?interaction=note

But as you can also see, the PaymentPlan property is empty. Can you check if I've set it in a wrong way?


#5

Hi @Luke_Curry,

I believe this is because your customer is passing PaymentPlan instead of the property's internal name, which is paymentplan. Most of the APIs are case-sensitive.