Forms API stoped working with a response status code of 307
Our call to HubSpot’s forms API was working without any problems up until a few days ago. Contacts are no longer being created in Hubspot when we call the forms API from within our app.
These are the responses that I’m getting back using the node.js example:
Status: 307
I20161020-14:41:33.972(-4)? Headers: {“server”:“AkamaiGHost”,“content-length”:“0”,“location”:“https://forms.hubspot.com/uploads/form/v2/1853273/dd734540df-4916-4a08-92ca-969961b43254",“expires”:..., 20 Oct 2016 18:41:34 GMT”,“cache-control”:“max-age=0, no-cache, no-store”,“pragma”:“no-cache”,“date”:“Thu, 20 Oct 2016 18:41:34 GMT”,“connection”:“keep-alive”}
We recently started routing Forms API traffic through Akamai, and while the submission URL path would be the same, Akamai enforces https/ssl/tls for the connections, so if you’re using http: for your POST URL, you’ll get that redirect to https:. Updating your POST to use https://forms.hubspot.com for the URL would skip that redirect.