简体   繁体   中英

Using the Hubspot COS Files API to download a file?

I've been fairly successful in using the Hubspot API. For example, I've written a PHP script (using the SevenShores HubSpot PHP API client) that lists out all companies and their file attachments.

Now I'd like to go a step further and download all of the file attachments. However, I didn't see an API endpoint for downloading an attachment. Any suggestions on how to do this?

I know that the meta-data returned from...

GET /filemanager/api/v2/files

.. includes the URL of the hosted files.

For example:

"type":"IMG", "updated":1381896526000,
"url":"http://cdn2.hubspot.net/hub/62515/file-352535575-png",
"version":1, "width":150

However, direct access to the URLs of the hosted files seems to be forbidden.

Thanks in advance!

I see this question is old, but since there are no other answers...

As far as I can see from various Hubspot forum posts (eg this one ), attachments directly uploaded to a company, contact, or deal can't be downloaded through the API at all.

Attachments can only be downloaded if they were uploaded to the Hubspot file manager, in which case they're public and can also be downloaded by unauthorised users.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM