APIs & Integrations

Não aplicável

Creating an HTTP Post URL for a 3rd party

I’m trying to deliver leads from a 3rd party via HTTP Post but I can’t find out what URL to give them in Hubspot. Anyone know what URL I need to send? Thanks in advance for your help!

8 Respostas 8
JBuckley08
Membro

Creating an HTTP Post URL for a 3rd party

robert, is there a way we can access POST documentaion including post URL

and header keys?

robertainslie
HubSpot Employee
HubSpot Employee

Creating an HTTP Post URL for a 3rd party

@Andrea_Roble - Your HubSpot API key is accessible in your HubSpot portal. You can learn how to find it in this article: https://knowledge.hubspot.com/articles/kcs_article/integrations/how-do-i-get-my-hubspot-api-key

Remember that this key grants access to all of your portal’s data, so keep it secret. If you’re sending form submission data, you might also want to check out the HubSpot Forms API, which doesn’t require authentication to submit form data - http://developers.hubspot.com/docs/methods/forms/submit_form

AdelinaM
Participante

Creating an HTTP Post URL for a 3rd party

Hi Robert,

I need the same URL but it's a bit unclear what I need to do from my side.

Should I just use this url:
https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testingapis@hubspot.com/?hapikey=dem...

(replacing the api key? what about the email testingapis@hubspot.com - what is this supposed to be?)

Anything else I need to do?

Thanks,
Adelina

0 Avaliação positiva
robertainslie
HubSpot Employee
HubSpot Employee

Creating an HTTP Post URL for a 3rd party

Hi @adelina.m,

This API endpoint will be utilized by a custom integration that you would build. You would fire an HTTP Post request when you wanted to create or update a contact in HubSpot from your 3rd party system. The documentation linked above will show how to properly send data to this endpoint.

The URL of the endpoint itself takes 2 parameters that will be unique to you: the HAPI key, which is the API key that allows authorization to your account (updated in the query string of the URL) and then the email address itself - https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/[insert-the-email-of-contact-to-upda...

0 Avaliação positiva
jsihota
Membro

Creating an HTTP Post URL for a 3rd party

Hi,
I actually have an issue with the end point I’m using to send data to hubspot. I’m getting a Validator Exception on the handshake using endpoint: https://api.hubapi.com/deals/v1/deal?hapikey=2595d96b-70b3-4cbe-8028-8d56f15c6384

Here is the exception using the post:

“POST /deals/v1/deal?hapikey=2595d96b-70b3-4cbe-8028-8d56f15c6384 HTTP/1.1[\r][\n]”
“Content-Type: application/urlencoded[\r][\n]”
“User-Agent: Jakarta Commons-HttpClient/2.0beta2[\r][\n]”
“Host: api.hubapi.com[\r][\n]”
"Content-Length: 2499[\r][\n]"
Error sending HTTP ADF
Error sending HTTP ADF
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target - 165e90c90c03
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Do I need to add the hubspot cert to the truststore for this to work?

robertainslie
HubSpot Employee
HubSpot Employee

Creating an HTTP Post URL for a 3rd party

@jsihota - I would recommend creating a new thread for this post since it does not relate to the original question.

Additionally, please do not post your HAPI key in your posts - this is a secret key that grants access to all of your portal’s data. I would recommend that you revoke access to your current key and generate a new key. You can find instructions for that here: https://knowledge.hubspot.com/articles/kcs_article/integrations/how-do-i-deactivate-and-reset-my-hub...

In the future, you should redact your hapi key and/or access token from any posts.

0 Avaliação positiva
robertainslie
HubSpot Employee
HubSpot Employee

Creating an HTTP Post URL for a 3rd party

Hi @Andrea_Roble,

The actual URL will depend on if you’re sending individual contacts or groups of contacts. Assuming you’re sending a single contact, the endpoint URL described on the following page will most likely get you what you want: http://developers.hubspot.com/docs/methods/contacts/create_or_update

The endpoint described there allows you to POST with an email address, which will create or update a contact in HubSpot with that email.

You can review the other endpoints on this overview page of docs: http://developers.hubspot.com/docs/methods/contacts/contacts-overview

Não aplicável

Creating an HTTP Post URL for a 3rd party

Got it, thanks @Robert_Ainslie! Where can we find the API key? Should that be supplied by the 3rd party, or is that something we should be providing to the 3rd party?

0 Avaliação positiva