I'm creating a third party webapp to allow for us to quickly search and sort through categorized and tagged files that could be in any folder on dropbox. The process would be that the user inputs either a link to the file or the file's dropbox path, assigns the tags in the webapp, and then the webapp accesses the dropbox api, finds the file, and populates metadata for the file rather than having to write all of that individually.
However, I can't wrap my head around the Teams api, I'm trying to access a file, but I keep getting a bad input error:
Error in call to API function "files/get_metadata": This API function operates on a single Dropbox account, but the OAuth 2 access token you provided is for an entire Dropbox Business team. Since your API app key has team member file access permissions, you can operate on a team member's Dropbox by providing the "Dropbox-API-Select-User" HTTP header or "select_user" URL parameter to specify the exact user <https://www.dropbox.com/developers/documentation/http/teams>.
The thing is, looking at the documentation for `dropbox.dropbox_client.DropboxTeam()`, even if I were to find the user ID and use `as_admin()` or `as_user()`, that just returns a `dropbox.dropbox_client.Dropbox()` which was giving me file/path not found errors when I was attempting to access files in the team, as it seemed to be trying to access that account's personal dropbox rather than the team one.
Looking online I also found this, but it seems to be not using any SDK, and I feel I shouldn't mix the Dropbox SDK with using requests.
So I'm just not sure how to move forward other than just pivoting, but I feel like I shouldn't have to -- just because the files are in a team doesn't mean it should be that much more complicated to access.
Also as a sidenote, if there is a way to access the metadata of files given the file's ID or URL, that would be way easier for me! I couldn't find anything about that though, seems all files have to be accessed via dropbox file path.