issues with Timeline Events API

SOLVE
Highlighted
Occasional Contributor

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

Reply
0 Upvotes
2 Accepted solutions

Accepted Solutions
Community Manager

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.

 

Reply
0 Upvotes
Community Manager

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.

 

Reply
0 Upvotes
4 Replies 4
Community Manager

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.

 

Reply
0 Upvotes
Occasional Contributor

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

Reply
0 Upvotes
Community Manager

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.

 

Reply
0 Upvotes
Occasional Contributor

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