APIs & Integrations

yorambaron
参加者

Create a file with Python API failed

解決

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

0 いいね!
1件の承認済みベストアンサー
yorambaron
解決策
参加者

Create a file with Python API failed

解決

Please disregard, I found the uploaded files under Marketing/File Manager.

元の投稿で解決策を見る

0 いいね!
1件の返信
yorambaron
解決策
参加者

Create a file with Python API failed

解決

Please disregard, I found the uploaded files under Marketing/File Manager.

0 いいね!