I have a custom form which makes a POST request to /form/v2/:portal_id/:form_guid with the proper tracking ID and data provided. The expectation is that I can subsequently make a GET request to /contacts/v1/contact/utk/:contact_utk/profile and have is-contact equal to true.
This is how my custom integration works 95% of the time. After the POST to the proper form is made, my script initially had a 5 second sleep timer in it. I have spoken to a HubSpot developer through the support ticketing, and they told me that could be too small of a delay. I have now set it to 10 seconds, per their recommendation.
The problem is that is-contact returns empty or false a small percentage of the time. I have been able to replicate it only a few times, but there are others who report the issue.
Some specifics:
Form is submitted
POST /form/v2/:portal_id/:form_guid
Response body is empty (expected result, I believe) and 204 (successful) HTTP response code
(script sleeps for 10 seconds)
GET /contacts/v1/contact/vid/:vid/profile
Response body (is-contact is empty or false) and a 200 (successful) HTTP response come back
Has anyone else experienced this before? Like I said, it works flawlessly almost always; however, sometimes it appears to fail.
I’m experiencing a similar issue: We ask for a few fields via a hubspot form and then attempt to read those fields via the utk contact api to use in a full signup process. When I immediately send users from the hubspot form to a page displaying those details, the details are often missing. Adding a 5-10s sleep after form submission sounds like a pretty bad user experience.
Are you making any other requests in the process? The form submission wouldn’t return a vid (as you mentioned the response body would be empty), so where are you getting the vid that you’re using for the GET in step 5?
The form submission and contact creation (or update) are asynchronous, but that process usually takes less than a second, and while it is possible for that to take longer, I’m not aware of any recent issues with that delay, but if you have an example contact record that you saw this with I can take a deeper look at this.
My apologies. I am using /contacts/v1/contact/utk/:contact_utk/profile, not the vid one.
I do have a screenshot of a failed response from the contacts endpoint. What/how could I give you to help from that? I appear to have a vid and a profile token.