APIs & Integrations

LeKevoid
Mitwirkender/Mitwirkende

How to get a contact's data by ID with the new APIs ?

lösung

Hi !

I think the question has been asked lots of time before, but the best documentation I can find only pertains to the old API...

 

I'd like to use a backend function to check the current visitor to our website (not hosted on Hubspot) using their hubspotutk cookie, and get some of their Hubspot properties so we can customize our content based on who they are.

 

My question is twofold :

1. Is there a reason why this would be a bad idea, security-wise or otherwise ?

2. Is there a way to do this ?

 

With the old API I could easily get what I wanted using the contact's VID, but I can't find the equivalent in the new one.

 

Thank you for your help !

0 Upvotes
1 Akzeptierte Lösung
dennisedson
Lösung
HubSpot-Produktteam
HubSpot-Produktteam

How to get a contact's data by ID with the new APIs ?

lösung

@LeKevoid 

Presently, there is not an v3 equivelant which is why these v1 endpoints are still maintained and supported.  I was informed a couple days ago that the team is pushing to bridge the gap between the two.  In the interim, you should feel safe employing the v1 endpoint.

Lösung in ursprünglichem Beitrag anzeigen

0 Upvotes
2 Antworten
webdew
Ratgeber/-in | Diamond Partner
Ratgeber/-in | Diamond Partner

How to get a contact's data by ID with the new APIs ?

lösung

Hi @LeKevoid ,

Use below documentation to get contact from ID.
Link : https://legacydocs.hubspot.com/docs/methods/contacts/get_contact
Screen shot : https://prnt.sc/1g2uhww

Example GET URL:
https://api.hubapi.com/contacts/v1/contact/vid/<VID>/profile?hapikey=demo


Hope this helps!


If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards.

0 Upvotes
dennisedson
Lösung
HubSpot-Produktteam
HubSpot-Produktteam

How to get a contact's data by ID with the new APIs ?

lösung

@LeKevoid 

Presently, there is not an v3 equivelant which is why these v1 endpoints are still maintained and supported.  I was informed a couple days ago that the team is pushing to bridge the gap between the two.  In the interim, you should feel safe employing the v1 endpoint.

0 Upvotes