APIs & Integrations

JeffGA
Member

500 Server Error - Form Submission API

I am working on an integration with the Forms API, specifically the https://forms.hubspot.com/uploads/form/v2/:portal_id/:form_guid endpoint.

I am pretty sure I have all of the parameters right after going through the documentation, but I am getting a 500 Internal Server error message back from HubSpot.

The response body is:
<html> <head><title>500 Internal Server Error</title></head> <body bgcolor="white"> <center><h1>500 Internal Server Error</h1></center> <hr><center>nginx</center> </body> </html>

Any idea where I could get some more detail as to the cause of the error? TIA!

0 Upvotes
5 Replies 5
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

500 Server Error - Form Submission API

Hi @JeffGA,

That seems fine to me; your request body looks like JSON but your content type is correctly set to application/x-www-form-urlencoded, so I'm not sure if that's an issue or not. Are you seeing these errors consistently? Can you direct message me your Hub ID so that I can take a closer look at the traffic specific to your portal?

0 Upvotes
JeffGA
Member

500 Server Error - Form Submission API

Derek, I sent you a couple of direct messages. Let me know if you need any additional information. Thanks!

0 Upvotes
JeffGA
Member

500 Server Error - Form Submission API

Derek, sorry, I missed the notification of your reply. I have attached a screenshot of that shows the request url (hub id, form id, and hapikey blacked out, but verified), request headers, and body content along with the HTTP response I am getting back from the API. Any suggestions would be greatly appreciated.!

submit-form-data-500-error|690x388

0 Upvotes
JeffGA
Member

500 Server Error - Form Submission API

Not sure that the uploaded image is working, so here are the details in text ...

Request URL:
POST https://api.hubapi.com/uploads/form/v2/[HUB ID]/[FORM GUID]?hapikey=[API-KEY]

Request Headers:
Content-Type: application/x-www-form-urlencoded

Request Body:
{
'email': 'XXXXX@gmail.com',
'firstname': 'Jane',
'hs_context': { 'ipAddress': '127.0.0.1' },
'lastname': 'Doe',
'phone': '555-122-2323',
'zip': '75024'
}

HTTP Response
500 Internal Server Error

<html> <head><title>500 Internal Server Error</title></head> <body bgcolor="white"> <center><h1>500 Internal Server Error</h1></center> <hr><center>nginx</center> </body> </html>
0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

500 Server Error - Form Submission API

Hi @JeffGA,

Can you give me the details of an example request you're making so that I can take a closer look?

0 Upvotes