So the file property has been going through changes, these changes have generally failed to consider existing usability of the file property which has resulted in numerous headaches for people already using the property how it was working before the changes....anyways there's now a public setting
Which is super, but it doesn't work really.
If a file is submitted from a form it'll be retrieved, yay
If a file is added via the hubspot admin (eg yellow highlight)
this simply returns an ID that isn't even accessible by the files api, just gives the 404 error unless the file exists in the filemanager (which it doesn't because that's not allowed via the new file property changes....)
so public isn't public all the time...? Is this just bad implementation or no body testing....whats the point of public when it doesn't work consistently or admin users are prevented for fixing customers errors (which are so frequent....)
Works for files attached via admin, fails for files attached via form.
If the file (with public set on the property) is attached via a form, it still gets flagged as private and gives a signed-url-redirect url which requires being logged into admin....because that's public right? The implementation is so botched and inflexible and untested by hubspot.
so then you gotta do a string split to get the file id from the signed-url-redirect, make the image public and then can call it....it's so stupid
After wrestling with this and related issues for a while (no useful responses from support) I stumbled over these additional scope options that have been added to the private API setup. Perhaps a recent addition?
There was no error message that lead me here - just work on an unrelated task.
Anyhow, when I use theses added scopes I get past the the 404 errors from the file API for uploaded and attached file IDs. The IDs start functioning correctly in all cases that I have explored.
After digging out more I've found out that the issue seems relate to the application scope. I did not add the files.ui_hidden.read scope and I was receiving 404 errors. When adding this permission and reinstalling the app, I'm able to load the files uploaded in the properties without any issues. The API returning a 404 instead of a 403 was misleading but I think it might be your underlying issue as well.
Works for files attached via admin, fails for files attached via form.
If the file (with public set on the property) is attached via a form, it still gets flagged as private and gives a signed-url-redirect url which requires being logged into admin....because that's public right? The implementation is so botched and inflexible and untested by hubspot.
so then you gotta do a string split to get the file id from the signed-url-redirect, make the image public and then can call it....it's so stupid
I'm facing the same issue, I am trying to setup a bi-lateral synchronization between one system and HubSpot. When uploading a file in a property using HubSpot Admin interface, I'm listening to the property change using a webhook, but when I'm trying to load the file entity through the API it's returning a 404 Not Found. Even trying to get a signed URL seems to fail. I don't have any proper solution right now.