APIs & Integrations

turningart
Membre

Troubleshooting Forms API submission

I’m creating form submissions via the Forms API but the metadata I pass in the hs_context parameter doesn’t appear to populate (regular properties like name and email populate fine, but I can’t see any analytics history, pages visited, etc). It looks like the hutk isn’t being ingested, but I’m getting a blank 204 response so I have no idea what it is about the parameter that’s incorrect. The value I’m passing in the request body is

firstname=TurningArt&lastname=Testing9&email=woekrJg%40owejfgg.com&phone=2345678901&company&budget=2000&how_can_we_help_=ignore&industry=Office&hs_context=%257B%2522hutk%2522%253A%2522738e377347f22584b5c0b4b3cb7cdddf%2522%252C%2522ipAddress%2522%253A%2522127.0.0.1%2522%252C%2522pageUrl%2522%253A%2522http%253A%252F%252Fta.dev%253A3000%252Fbusiness_inquiries%2522%252C%2522pageName%2522%253A%2522TurningArt%2520Contact%2520Form%2522%257D

How do I debug this?

0 Votes
1 Réponse
Dadams
HubSpot Employee
HubSpot Employee

Troubleshooting Forms API submission

@turningart the hs_context data is being double encoded. If you decode the data in your data, the result is the correctly encoded data:

%7B%22hutk%22%3A%22738e377347f22584b5c0b4b3cb7cdddf%22%2C%22ipAddress%22%3A%22127.0.0.1%22%2C%22pageUrl%22%3A%22http%3A%2F%2Fta.dev%3A3000%2Fbusiness_inquiries%22%2C%22pageName%22%3A%22TurningArt%20Contact%20Form%22%7D

0 Votes