Lookup errors when finding contact by Hubspot UTK


#1

We’re trying to look up users by HUTK (by grabbing the cookie value from the user’s browser).

Most of the time it works fine, but sometimes we get errors like this:

'{"status":"error","message":"contact does not exist","correlationId":<stripped>,"requestId":<stripped>"}'

This started on November 13; it did not happen at all before then.

Also, since November 14th, we’ve periodically seen this HTML come back when trying to fetch contacts:

<html> <head><title>502 Bad Gateway</title></head> <body bgcolor="white"> <center><h1>502 Bad Gateway</h1></center> <hr><center>nginx</center> </body> </html>

Is it possible that there’s some misconfiguration that is causing both of these problems?

Thanks!


#2

Hi @rsmiley,

Not all user tokens correspond to a contact record in HubSpot. For example, a visitor who has never converted on a form will still have a user token, but the ‘Get contact by user token’ endpoint will 404 since it’s not associated with a contact record.

Regarding the other error; can you reach back out with the details of the request that resulted in that error? Specifically, the request URL and the full request body (sans authentication).


#3

Sure, it was a GET request to:

https://api.hubapi.com/contacts/v1/contact/vid/113582551/profile


#4

Hi @rsmiley,

The 502: Bad Gateway errors come from our load balancer; this often happens as a result of high, sustained volume to a particular service (in this case, the contacts API). Even if the volume is within the API limits, it might result in errors if the service is experiencing high traffic. If you get these errors, it’s best to lighten up on the service for a second or two, and the errors will likely resolve themselves.