Timeline events authentication not working

Hi! I have a problem while trying to get all timeline events from my hubspot app.
In the code im successfully getting contacts, owners etc. with my oauth requests but when i try to use:

try {

const apiResponse =

await hubspotClient.crm.timeline.templatesApi.getAll(appId)

console.log(JSON.stringify(apiResponse.body, null, 2))

} catch (e) {

e.message === ‘HTTP request failed’

? console.error(JSON.stringify(e.response, null, 2))

: console.error(e)

}

i get the following error:

body: {
status: ‘error’,
message: ‘Any of the listed authentication credentials are missing’,
correlationId: ‘2b8ada6e-af25-4a80-b363-a07a398ed30a’,
engagement: {
hapikey: ‘hapikey not engaged. hapikey is not present in query params.’,
‘oauth-token’: ‘oauth-token not engaged. OAuth access token not found in request header.’,
‘service-to-service’: ‘service-to-service not engaged. Metadata for service-to-service request not found.’,
‘internal-cookie’: ‘internal-cookie not engaged. Cookie not found in the request.’,
‘app-cookie’: ‘app-cookie not engaged. App cookie is not present on the request.’
}

I have checked my scopes and it includes timeline. Hoping that someone can point me in the right direction. Best regards

@EAminoff ,

If you are looking to grab the template, you will need to use your developer API key referenced in the docs

Accounts Dashboard | HubSpot under POST
/crm/v3/timeline/events The API reference for node.js is incorrect. It says
hubspotClient.crm.timeline.events.eventsApi.create even though it should
be hubspotClient.crm.timeline.eventsApi.create. Thought you might want to
know. Thanks again for your help. Best regards,

Getting same error , i have to use oauth access token ,
Because i have to use this api on the behalf of my user who login and will provide access token to me ,
and i tried alot and getting the same above error
provided by @EAminoff
so, @dennisedson please let me know how i can use this api , with access token , i need to do CRUD operation with timeline event templates .
@lindahl

Hi @EAminoff , just doing a double check, did you add the right appId in the path as well as declaring the variable when doing the GET request? The request is quite simple so I guess we just need to double check either OAuth token or appId is incorrect/not present.

Hello! I managed to make the get request with the developers API-key. Thank
you for your help!