APIs & Integrations

cpradalier
Participant

https://api.hubapi.com/filemanager/api/v3/files/upload 415 error

hi,

i send this

curl_setopt_array($curlarray(
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
  "access": "PUBLIC_INDEXABLE",
  "name": "test101202.pdf",
  "folderId": "63326534593",
  "duplicateValidationStrategy": "NONE",
  "duplicateValidationScope": "EXACT_FOLDER",
  "overwrite": true
}',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer pat-************************************',
    'Content-Type: application/json'
  ),
));
 
the return status is 
Error 415 Unsupported Media Type
i tried with a .txt instead a .pdf it's exactly the same
thanks for your help
0 Upvotes
2 Replies 2
cpradalier
Participant

https://api.hubapi.com/filemanager/api/v3/files/upload 415 error

0 Upvotes
Jaycee_Lewis
Community Manager
Community Manager

https://api.hubapi.com/filemanager/api/v3/files/upload 415 error

Hey, @cpradalier One quick question — does https://myspace.com/101202/administratif/test101202.pdf work for you? I got a 404. 

I wonder if we could test with a different PDF or with a different URL.

 

Best,

Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes