APIs & Integrations

JCoro
Member

How do I import each user's HubSpot data into my React platform using their email?

SOLVE

Please help me.

 

Now I am building React project and this is my purpose.

Each users input their email information and then they get their whole data from hubspot. Of course that email is hubspot singin email.

 

Is it possible? 

How can I do this?

If users need more information, what is that?

 

0 Upvotes
1 Accepted solution
WesQ
Solution
Top Contributor

How do I import each user's HubSpot data into my React platform using their email?

SOLVE

Hi @JCoro 

 

You can use HubSpot's Contacts API to fetch the contact data. 

 

Reference: 

https://developers.hubspot.com/docs/reference/api/crm/objects/contacts#basic

 

If you have the contactId, you can use the basic GET 

 

https://api.hubapi.com/crm/v3/objects/contacts/{contactId}

 

 

But since you have email, you can search for contacts using POST

 

POST https://api.hubapi.com/crm/v3/objects/contacts/search
Authorization: Bearer pat-na1-4b6edd76-***************
Content-Type: application/json

{
  "filterGroups":[
    {
      "filters":[
        {
         "propertyName":"email",
         "operator":"EQ",
         "value": "wes@pearagon.com"
        }
      ]
    }
  ],
"properties": ["firstname", "lastname"]
}

 

When using search, make sure you send a body like this

 

WesQ_0-1739150175743.pngWas I able to help answer your question? Help the community by marking it as a solution.

 

View solution in original post

0 Upvotes
1 Reply 1
WesQ
Solution
Top Contributor

How do I import each user's HubSpot data into my React platform using their email?

SOLVE

Hi @JCoro 

 

You can use HubSpot's Contacts API to fetch the contact data. 

 

Reference: 

https://developers.hubspot.com/docs/reference/api/crm/objects/contacts#basic

 

If you have the contactId, you can use the basic GET 

 

https://api.hubapi.com/crm/v3/objects/contacts/{contactId}

 

 

But since you have email, you can search for contacts using POST

 

POST https://api.hubapi.com/crm/v3/objects/contacts/search
Authorization: Bearer pat-na1-4b6edd76-***************
Content-Type: application/json

{
  "filterGroups":[
    {
      "filters":[
        {
         "propertyName":"email",
         "operator":"EQ",
         "value": "wes@pearagon.com"
        }
      ]
    }
  ],
"properties": ["firstname", "lastname"]
}

 

When using search, make sure you send a body like this

 

WesQ_0-1739150175743.pngWas I able to help answer your question? Help the community by marking it as a solution.

 

0 Upvotes