APIs & Integrations

EAminoff
Member

Timeline events authentication not working

SOLVE

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

0 Upvotes
1 Accepted solution
dennisedson
Solution
Community Manager
Community Manager

Timeline events authentication not working

SOLVE

@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

Thanks,

Dennis




HubSpot Community Developer ShowMake sure to subscribe to our YouTube channel
where you can find the HubSpot Community Developer Show

View solution in original post

0 Upvotes
4 Replies 4
lindahl
Contributor | Diamond Partner
Contributor | Diamond Partner

Timeline events authentication not working

SOLVE

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
Member

Timeline events authentication not working

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

Timeline events authentication not working

SOLVE

@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

Thanks,

Dennis




HubSpot Community Developer ShowMake sure to subscribe to our YouTube channel
where you can find the HubSpot Community Developer Show
0 Upvotes
EAminoff
Member

Timeline events authentication not working

SOLVE
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,