Timeline events show 204 Success but no Headers/Body

oauth
contacts

#1

I have created a Contact and then attempted to update that contact’s Timeline with the Timeline API. My calls seem to be hitting Hubspot with a 204 response, but the logging does not contain headers or body for some reason:

PUT REQUEST:

requestOptions { method: 'PUT',
  headers:
   { 'Content-Type': 'application/json',
     'User-Agent': 'node-hubspot',
     'Accept-Encoding': 'gzip, deflate',
     Authorization: 'Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' },
  encoding: null,
  body:
   { id: '701-603-1496789319',
     eventTypeId: '18160',
     email: 'XXXXXXX@gmail.com',
     extraData: '' },
  json: true,
  uri: 'https://api.hubapi.com/integrations/v1/36810/timeline/event' }

CALL LOG - No header/body information? Is this right?

I am using node-hubspot with some modifications and have isolated the call being made. Portal ID is 2595002 and the APP ID is 36810. The user I’m looking at is https://app.hubspot.com/contacts/3404382/contact/51/ (the gmail matches the payload being sent in). I’m showing ALL timeline things aka no filter. Is there some mapping I’m not seeing to get these events into the timeline?

  • image would be here but rules prevent me from being helpful -

The event has a header template

  • image would be here but rules prevent me from being helpful -

And I’ve enabled it in the App config.

  • image would be here but rules prevent me from being helpful -

What else is there? Thanks!


#2

Adding some detail:


#3

The event I’m trying to track on a user’s timeline.


#4

The App config for my app:


#5

@notbrain I appreciate all of the information. A 204 means No Content by definition. Here is a link to the different http status codes.

http://www.restapitutorial.com/httpstatuscodes.html

I wouldn’t worry as that is acting how it is intended to do so.


#6

Thanks for the quick reply. But then I’m confused - if the body of the REQUEST is empty, how does the API know to add an event to my user? It’s not in the URL, it’s JSON in the body. It’s not the body of the API response that I’m worried about, it’s my request.

What is strange is that on invalid requests, I see both the request and response bodies/headers, so I would expect to see these on 204 success calls to confirm that the payload I sent is reaching the API:

The main issue I’m trying to salve is how to make sure all the pieces are in place to get these (apparently successful) timeline event calls to show up in the timeline for the user specified in the call, but they are not showing up.

Is there some sort of registration I’m not doing?


#7

The 204 is the response and not the requesting call so be careful not to mix those up. We would take the body of your call an upon success then return to you a 204.

Are you receiving 204s and are they not popping up on the right timelines?


#8

Are you receiving 204s and are they not popping up on the right timelines?

Yes, this is exactly what is happening. API calls seem to be working fine (and you’re saying no body or headers in requests is ok?), but I am not seeing any timeline events appear in the Contact’s view. At least, not where I’m expecting them to show up, but I’m uncertain I’ve connected all the pieces together.

I’m sending this payload and getting 204 Success:

requestOptions { method: 'PUT',
  headers:
   { 'Content-Type': 'application/json',
     'User-Agent': 'node-hubspot',
     'Accept-Encoding': 'gzip, deflate',
     Authorization: 'Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' },
  encoding: null,
  body:
   { id: '701-603-1496789319',
     eventTypeId: '18160',
     email: 'XXXXXXX@gmail.com',
     extraData: '' },
  json: true,
  uri: 'https://api.hubapi.com/integrations/v1/36810/timeline/event' }

Note: id is auto-gen with a timestamp, so it changes for every call.

And then checking here to see if the event shows on the timeline for n*****n@gmail.com contact:
https://app.hubspot.com/contacts/3404382/contact/51/

But I’m unclear whether or not I’ve hooked up the app (ID 36810) to this test portal. The docs are super-geared toward offering HS integration for multiple user OAuth; our integration is we have an app and want to update any of our users when they do things on our platform, and get those events into each contact’s timeline.


#9

Nevermind, got it. Was confused on which app to set the integration and OAuth connection. A bit confusing with the developer portal vs real portal and having an Account and also a Trial to integrate with.


#10

I’m glad you figured it out. What was the issue? Were you creating time line events for your dev portal instead of your trial portal?


#11

Also, main problem still exist,
Api call Logging do not show incoming Headers and body.


#12

@Alexey_Syrok can you start a new thread ad give me more details on what you are running into?