API - Download organization attached image file

Hi,

How can I download a organization attached image file?
At the endpoint " List files attached to an organization" I can get the URL and file name, but I when I tried to download the file URL+[file name] I get error msg unauthorized access

Tks,

Vander

Hi @Vander_Eduardo_Ferreira

GET /organizations/{id}/files (“List files attached to an organization”) endpoint returns a list of files attached to an organization (as you already saw it). The url key in each file looks something like this

which is another endpoint in public API

GET /files/{id}/download https://developers.pipedrive.com/docs/api/v1/#!/Files/get_files_id_download

You need to specify file’s ID, which for a file URL describe above will be

As file download is also an endpoint in public Pipedrive API, you need to authorize the request with API token or OAuth token (more about that here https://pipedrive.readme.io/docs/core-api-concepts-about-pipedrive-api) to download a file.