Hello,
I tried to use the following Python code to upload a file to HubSpot, the code was copied from this link:
import requests
files = {'files': open('/path/on/your/local-computer/report.xls', 'rb')}
r = requests.post(
'http://api.hubapi.com/filemanager/api/v2/files?hapikey=demo',
data={
"folder_paths": "folder-in-the-cos-file-manager/subfolder"
},
files=files)
I ran this script but there was no response from the Linux shell. In addition I couldn’t find the uploaded file in HubSpot..
Questions:
I1. s there a problem with this API example? I saw a few people that asked a simillar question.
2. How do you run this code with the curl command?
Thanks,
Yoram