I’m trying to add a contact to Hubspot and I’ve been following the guide. I wrote a script that runs a PHP script that uses a CURL request, but when I send anything with a POST request, I get a Cloudflare 400 error page.
There’s nothing special here. I’ve stripped my PHP script down to just the bare data (which closely mirrors the demo script in the docs), but no matter what data I send I get the same result.
Do you have the full error message code that you can share with me? Additionally, what is the HubSpot portal ID in which you’re creating the contact on?
I haven’t had a chance to fiddle with Postman. This is the full error from CURL
<html>
<head><title>400 Bad Request</title></head>
<body>
<center><h1>400 Bad Request</h1></center>
<hr><center>cloudflare</center>
</body>
</html>
As I said previously, I do get a JSON error running it on an AWS server
{"status":"error","message":"Invalid JSON input: No content to map due to end-of-input at line 1, column 0","correlationId":"cc0b2d88-bffa-41ef-a18e-60e6641723a6","requestId":"31e53c5741a2fb2e2edfe7f63548012a"}
That could be due to the copy-paste over the command line, however.
I’m also getting the same error when try to clear contact properties and create activities. First API call becoms success but after that all calls gives below error. These are consecutive API calls runs one after the other (Clear fields and create activities).
<html>
<head><title>400 Bad Request</title></head>
<body>
<center><h1>400 Bad Request</h1></center>
<hr><center>cloudflare</center>
</body>
</html>