APIs & Integrations

Scott_McPherson
Member

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”}

And this is almost identical to how I’m posting to the endpoint (Node.js): http://developers.hubspot.com/docs/methods/forms/submit_form

I’m getting back a 307 status code which is a temporary redirect. Is that normal? I would think it would be a 200

I replaced the location response with a sudo url.

Any recommendations on how to further trouble shoot this?

0 Upvotes
1 Reply 1
Dadams
HubSpot Employee
HubSpot Employee

Forms API stoped working with a response status code of 307

Hi @Scott_McPherson

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.

0 Upvotes