Alternative Integration Methods

We have a 3rd party lead client that we wish to integrate with HubSpot, but are having some difficulties. I have built the private app and they have reviewed all documentation; however, the client states that they cannot post to it beacuse it requires authentication and they use simple HTTP POST methods for their integrations.

This being my first attempt at integration, I am running into some trouble. Can I get some assistance or a further explanation?

Thank you.

Hey @Logan_D,

If you’ve configured a private app within HubSpot you should also have obtained an access token which is associated to the app itself. This is used to authenticate any requests you make to the HubSpot API whether they’re GET, PUT, POST, PATCH or DELETE. My recommendation is to share the documentation here, specifically the section titled “Make calls with your app’s access token”.

If the above doesn’t help then I’d probably need you to elaborate on the type of POST requests the lead client is trying to make. For anything related to creating contacts it’s just a case of ensuring the request is formatted as follows:

POST https://api.hubapi.com/crm/v3/objects/contacts
HEADER Authorization: Bearer YOUR_ACCESS_TOKEN
BODY
{
 "properties": {
 "email": "peterparker@marvel.com",
 "firstname": "Peter",
 "lastname": "Parker",
 "website": "marvel.com"
 }
}

I hope this helps!

Thanks for providing that information @coldrickjack. The client was able to create customer records on their end now; however, the property fields are not filling. They stated they were using JSON and the unique identifiers from our properties, but are not sure why the records were posting blank. Any ideas??

Hey @Logan_D,

So they’re half way there. They’ve been able to successfully authenticate hence the contact being created however the body of their request in not in the proper format. HubSpot expects it to look like this:

{
 "properties": {
 "firstname": "",
 "lastname": "",
 "email": "",
 "phone": "",
 "origin_zip_code": "",
 "tozip": "",
 "movedates": "",
 "movesize": ""
 }
}

You also need to ensure that the names of the properties above correlate to the internal names of the properties in the CRM. For things like “firstname” and “lastname” that isn’t an issue as they’re default properties. However for things like “origin_zip_code” and “tozip” etc… you need to make sure they’re setup in the CRM.

Once they get their request correctly formatted you can expect to see data being populated.