Hey!
I have a short python script, connecting and running a few files operation over my dropbox team folder.
Up until now I was able to upload and delete files, but since I tried to read files from there I was not able to do that. I realized that my token could miss the required permission, so I updated the app and then got a new refresh token with the following scopes:
account_info.read events.read files.content.read files.content.write files.metadata.read files.metadata.write files.permanent_delete files.team_metadata.read files.team_metadata.write groups.read members.read team_data.content.read team_data.content.write team_data.governance.read team_data.governance.write team_data.member team_data.team_space team_info.read team_info.write
Again, no luck, when running this:
from os import environ as env
from dotenv import load_dotenv
from dropbox import DropboxTeam
from dropbox.common import PathRoot
if __name__ == "__main__":
load_dotenv()
path_root = PathRoot.root(env["ROOT_FOLDER_ID"].strip())
client = (
DropboxTeam(
app_key=env["APP_KEY"].strip(),
app_secret=env["APP_SECRET"].strip(),
oauth2_refresh_token=env["REFRESH_TOKEN"].strip(),
)
.with_path_root(path_root)
.as_user(env["USER_ID"].strip())
)
client.files_download_to_file("hello.json", path="/my dropbox folder/hello.json")
I get the following exception
dropbox.exceptions.AuthError: AuthError('c45f5e7719c7490b89f2fa6af930df5d', AuthError('missing_scope', TokenScopeError(required_scope='files.content.read')))
Any idea of what might be going on?