There's a new version of the HubSpot API

As of November 30, 2022, HubSpot API keys are no longer a supported authentication method for accessing HubSpot APIs. Instead, you should use a private app access token or OAuth to authenticate API calls. Learn more about this change and how to migrate an API key integration to use a private app instead.

Get a signed URL for a private file

Last updated May 22, 2023

GET /filemanager/api/v3/files/:fileId/signed-url

Method Details

HTTP Methods:

GET

Response Format:

json

Requires Authentication?

Yes

Rate Limited?

Yes

Headers

User-Agent

Products:

Marketing & CRM

Required Scope:

files

Get the details for a private file. The details will include a signed URL that can be used to retrieve the contents of the file.

Private files cannot be access using their URL alone. The signed URL returned by this endpoint can be used to get temporary access to the file contents.

Notes:
  • When using OAuth for your authentication, files that are both private and hidden cannot be accessed without the files.ui_hidden.read scope. See the details below.
  • The signed URL will only be valid for a few hours, after which the URL will result in an error. At this point, you would need to request a new signed URL to access the file again. The expiresAt field in the response is a UNIX-formatted timestamps in milliseconds that represents the time that the URL will expire.
Required Parameters How to use Description
OAuth Access Token  Authorization: Bearer {token} header Used to authenticate the request. Please see this page for more details about authentication.

Scopes and hidden files

When using an OAuth access token, the files.ui_hidden.read scope will be required to get a signed URL for any files that are set to hidden. Hidden files are not visible in the files tool in HubSpot, and would include files such as files attached to CRM records.

IIf a file is hidden, and the access token does not have the files.ui_hidden.read scope, a 404 error will be returned.