APIs & Integrations

davidwork7
Participant

React API some time VID Return Blank

We use node js to find VID base on Email

var chkFindVid = await getVidByemail(email);
async function getVidByemail(email) {
try {
let users = await hubspot.contacts.getByEmail(email);
return users.vid;
} catch (err) {
return 0;
}
}

 

Above is functio to find VID base on Email

 

Now our functionalyu Like Our Customer Fill Form in HS landing page after submit redirect another page and another page we display new form that form is our 3rd party site, so, that page use fill and submit we call above fucntion and pass that email and find base on that Email VID and VID find then we store in our DB

But some time VID Blank retrun

 

This happen only some time

That function Daily Approx 3k+ time call but that happen approx daily 8-10 customer

 

So, can you look like your API in daily some second stop or crash.

 

OR can you check like some time After fill form and submit HS take some mnt to add customer in HS system.

 

WHen email : testödemo@icloud.com , so this case also error like StatusCodeError: 400 - <h1>Bad Message 400</h1><pre>reason: Bad Request</pre>

2 Replies 2
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

React API some time VID Return Blank

Hey @davidwork7 ,

 

Can you clarify a few things for me?

  1. When no VID is returned, are you receiving an error from HubSpot?
  2. Are you making the request to the HubSpot API immediately after the visitor submits a form?
  3. When you try to get the contact's VID and fail, do you retry the request after?
0 Upvotes
davidwork7
Participant

React API some time VID Return Blank

When no VID is returned, are you receiving an error from HubSpot?

ANS:  VID = 0 i found solution like i need to make email to pass encoded

 

Are you making the request to the HubSpot API immediately after the visitor submits a form?

ANS: not same time but within 30 to 60 second call API


When you try to get the contact's VID and fail, do you retry the request after?

ANS: solve now

0 Upvotes