APIs & Integrations

saket1472
Member

issues with Timeline Events API

SOLVE

We are facing some issues with Timeline Events and need help.

We tried creating Events in below ways:

  1. Using API keys:-
    1. Created an APP in developer Account
    2. Got User Id and hapikey
    3. Created the event using Postman client:-

postTimeline.png

    1. Event appeared in developer Account
    2. But nothing is shown in my contact page present in Testing account:-

Screenshot 2019-12-03 at 8.50.15 PM.png

 

  1. tried using oauth token
    1. Generated code using url: https://app.hubspot.com/oauth/authorize?client_id=85523963-7ac8-4584-9ff3-d62d56478208&redirect_uri=...
  2. Got the access token.
  3. Updated custom field in contact and it successfully updated.
  4. But while creating event, I am seeing authorization error

Screenshot 2019-12-03 at 9.00.20 PM.png

Can Some please help us with above issue

0 Upvotes
2 Accepted solutions
WendyGoh
Solution
HubSpot Employee
HubSpot Employee

issues with Timeline Events API

SOLVE

Hi @saket1472,

 

I'm happy to help, but please do not share full authentication credentials on this public forum. If you post a HubSpot API key or OAuth access or refresh token on the Community, it should be considered compromised and should be deactivated immediately.

 

I've taken the liberty of obscuring the "hapikey" you shared. For your security, please also deactivate and generate a new HAPIkey.

 

Let's now take a look at the issue that I believe I may be able to shed some lights on.

 

In this case, it looks like you're using the create timeline event type to create timeline event. These two function may have similar endpoint:

 

Create Timeline Event Type

 

POST /integrations/v1/:application-id/timeline/event-types

 

 

Create Timeline Event

 

PUT integrations/v1/:application‐id/timeline/event

 

 

which could have caused the confusion. 

 

Could you try using the Create Timeline Event endpoint to create an event for contact 

saket.destiny@gmail.com and see if it works?

NOTE: You must use an OAuth access token to create an event. API keys are not supported.

 

View solution in original post

0 Upvotes
WendyGoh
Solution
HubSpot Employee
HubSpot Employee

issues with Timeline Events API

SOLVE

Hi @saket1472,

 

The error message:

405 method not allowed implies that the request method is known by the server but is not supported by the target resource. Reference this documentation: 405 Method Not Allowed - HTTP | MDN.

 

When looking to create timeline event, the method is PUT and not POST.

 

View solution in original post

0 Upvotes
7 Replies 7
WendyGoh
Solution
HubSpot Employee
HubSpot Employee

issues with Timeline Events API

SOLVE

Hi @saket1472,

 

I'm happy to help, but please do not share full authentication credentials on this public forum. If you post a HubSpot API key or OAuth access or refresh token on the Community, it should be considered compromised and should be deactivated immediately.

 

I've taken the liberty of obscuring the "hapikey" you shared. For your security, please also deactivate and generate a new HAPIkey.

 

Let's now take a look at the issue that I believe I may be able to shed some lights on.

 

In this case, it looks like you're using the create timeline event type to create timeline event. These two function may have similar endpoint:

 

Create Timeline Event Type

 

POST /integrations/v1/:application-id/timeline/event-types

 

 

Create Timeline Event

 

PUT integrations/v1/:application‐id/timeline/event

 

 

which could have caused the confusion. 

 

Could you try using the Create Timeline Event endpoint to create an event for contact 

saket.destiny@gmail.com and see if it works?

NOTE: You must use an OAuth access token to create an event. API keys are not supported.

 

0 Upvotes
saket1472
Member

issues with Timeline Events API

SOLVE

Thanks for the response. I have tried with event Api, now seeing a different issue.

 

Screenshot 2019-12-06 at 10.14.30 AM.png

0 Upvotes
WendyGoh
Solution
HubSpot Employee
HubSpot Employee

issues with Timeline Events API

SOLVE

Hi @saket1472,

 

The error message:

405 method not allowed implies that the request method is known by the server but is not supported by the target resource. Reference this documentation: 405 Method Not Allowed - HTTP | MDN.

 

When looking to create timeline event, the method is PUT and not POST.

 

0 Upvotes
lfernandez
Participant

issues with Timeline Events API

SOLVE

Hi,

Even I am getting issue when I create a timeline event.

I have a company with company-id:2912491730.

Also I have created a timeline event for Company

Postman1.png

0 Upvotes
saket1472
Member

issues with Timeline Events API

SOLVE

Thanks a lot, @WendyGoh. I am able to publish my first Event.

lfernandez
Participant

issues with Timeline Events API

SOLVE

Hi,

Even I am not able to create a timeline event

Can you please help

Postman1.png

0 Upvotes
WendyGoh
HubSpot Employee
HubSpot Employee

issues with Timeline Events API

SOLVE

Hey @lfernandez,

 

Happy to help here! I have responded back to your DM. 

0 Upvotes