APIs & Integrations

EAminoff
Miembro

Timeline events authentication not working

resolver

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

1 Soluciones aceptada
dennisedson
Solución
Equipo de producto de HubSpot
Equipo de producto de HubSpot

Timeline events authentication not working

resolver

@EAminoff ,

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

CRM_API___Timeline_events.png

Ver la solución en mensaje original publicado

5 Respuestas 5
lindahl
Colaborador | Partner nivel Diamond
Colaborador | Partner nivel Diamond

Timeline events authentication not working

resolver

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.

EAminoff
Miembro

Timeline events authentication not working

resolver
Hello! I managed to make the get request with the developers API-key. Thank
you for your help!
dennisedson
Solución
Equipo de producto de HubSpot
Equipo de producto de HubSpot

Timeline events authentication not working

resolver

@EAminoff ,

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

CRM_API___Timeline_events.png

AHussain17
Participante

Timeline events authentication not working

resolver

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 




0 Me gusta
EAminoff
Miembro

Timeline events authentication not working

resolver
https://developers.hubspot.com/docs/api/crm/timeline 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,