Forms call getting 301 redirect header response


#1

Hi there,

I’ve noticed that scripts that I have using the Forms API stopped functioning and in inspecting the response headers I’m seeing this (portal number removed). The form is still in our HS portal and is active, so what would cause this 301 response? Should I be using a different path?

FWIW, I’ve been using curl/PHP calls with no issues until very recently (like the last 2 days).

Thanks,

Chuck Wyatt

HTTP/1.1 301 Moved Permanently Server: AkamaiGHost Content-Length: 0 Location: https://forms.hubspot.com/uploads/form/v2/####/234234234-4b6d-8abc-195f3eb3a066 Expires: Wed, 19 Oct 2016 01:26:30 GMT Cache-Con


#2

Hi @Chuck_Wyatt

Are you using http: in the request URL? We made a change to forms.hubspot.com yesterday to route traffic through Akamai, and part of the change will require you to use https for the request protocol. If you’re using http:, you’ll get that 301 redirect to the https: URL, so if you follow the location header and make a second POST request to the new URL using the same data that would also work.