Submit data to form API not working


Am trying to set up Submit data to form API and have got this far but not working:

Hubspot Link Code:

@hubspot_url = ‘
@hubspot_path = '/uploads/form/v2/:portal ID/:Form GUID
hubspot_fields = {
:IPAddress => request.remote_ip,
:UserToken => cookies[:hubspotutk],
:FirstName => isa_registration.forenames,
:LastName => isa_registration.surname,
:Email =>,
:Company => isa_registration.place_of_work,
:Country => country,
:Phone => isa_registration.phone_number,
:Salutation => isa_registration.title,
:JobTitle => isa_registration.job_title,
:State => us_state,
:WhereHeard => isa_registration.where_heard
http =
res =, hubspot_fields.to_param)

we have the correct url with portal ID and GUID ID get http 400 error , problem accessing /uploads/form/…, http get is not supported by this url.

any assistance would be appreciated


@bigfish You’ll need to submit the data using https, otherwise if you’re POSTing to you’ll get a 307 response, and in this case it looks like the redirect URL is being followed but it’s making a GET request instead of making another POST request. If you make the initial POST using you shouldn’t see that error.