// Return response instead of outputting curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); //Log the response from HubSpot as needed. print_r($response);
// Return response instead of outputting curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); //Log the response from HubSpot as needed. //print_r($response);
// Return response instead of outputting curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); //Log the response from HubSpot as needed. //print_r($response);
Hi @Teun Yes, I also tried with Content Type: text/plain . but still its not working. can you please help me in this. I need to fix it on urjent basis.
The post you shared is from november '20. I'm pretty sure the v3 files API is out of beta. Please look at the endpoints of https://developers.hubspot.com/docs/api/files/files. I've answered a few questions about this endpoint and I am 100% positive it should work.
Learn more about HubSpot by following me on LinkedIn or YouTube
✅ Did my answer solve your issue? Help the community by marking it as the solution.
What is the second param you pass to new CURLFile()?
Could you try setting it to 'application/octet-stream'? So:
$upload_file = new CURLFile('https://dl.airtable.com/.attachments/4b3ae7d535258081f030e2552b667693/6a41a2b5/download3.png', 'application/octet-stream');
Learn more about HubSpot by following me on LinkedIn or YouTube
✅ Did my answer solve your issue? Help the community by marking it as the solution.
Sep 24, 20217:23 AM - edited Sep 24, 20217:25 AM
Participant | Platinum Partner
Hubspot File Post Api Not Working
SOLVE
Hi @Teun Thanks for your Response! I have changed the content-type to 'application/octet-stream' but still I am getting the same issue. Can you please check the below snapshot. https://prnt.sc/1tgagib Thanks