Hey I am trying to add timeline on form submit using ajax request thru javascript,
Flow ->
Form submit ( redirects to another form)
capture user details
call timeline api event to create timeline ( using javascript)
redirect to external url ( using javascript)
at step 3 I am getting below error
{"status":"error","message":"You don't have access to this application.","correlationId":"46861cf4-64fa-425a-8a26-89aaffe78622","requestId":"47bed49c290f7553acdbc61c28c02956"}
How I can check I where I am doing wrong like access related details ?
Already checked with hubspot guys, but seems no issue on permission end
// here portalId= non dev account id
//eventTypeId = already created in dev account with 2 properties, emailid, sessionid
//email[support@xxxxx.com] = already present in non dev account as contact
Hapikey shouldn't be present to create a timeline event. you'd only need the developer portal's hapikey if you were making a GET request to see all timeline events that you'd created. The specifics of creating a timeline event are here: https://developers.hubspot.com/docs/methods/timeline/create-or-update-event
Hi Connor,
Thanks for the reply .... I could see this is new for me, I had developer account and I was able to use api to get access to event type.
But not sure how I use this to create timline in contact .... means how to link both dev and other(non-developer) account, since timeline is not in other(non-developer) account.
I tried (non-developer) account appid, myuser id and my hapikey but no access...
Hi @rajputsushil, do you have a test account? https://developers.hubspot.com/docs/faq/how-do-i-create-a-test-portal. The root of the issue you're seeing is that Developer Portals and normal/test portals is that Developer Portals do not and cannot have any of those tools in them. To test how an application would work with a live portal, we'd either use a live portal if you have one, or create a test portal as I stated above.
If you create a test portal, you should be able to go into that and either create some contacts to test the timeline API on, or create a timeline event on an existing contact if you have them. You'll need the grant the application authorization to that test portal by going through the OAuth flow before you can submit a Timeline Event. Make sure you read the Prerequisites section in this article before you jump into creating timeline events
That said, when a contact submits a form there should be a section on that contact's timeline related to a submission, like this: http://prntscr.com/l26nlr
Why are you looking to create a timeline event after a form submission?