[Python] dropbox, python api : error when on uploading a file

Discussão em 'Python' iniciado por Stack, Agosto 3, 2025.

  1. Stack

    Stack Membro Participativo

    I am using the following python code in order to upload a file to dropbox :

    import dropbox, os
    from dotenv import load_dotenv
    load_dotenv()
    DROPBOX_ACCESS_TOKEN = os.getenv("DROPBOX_ACCESS_TOKEN")
    dbx = dropbox.Dropbox(DROPBOX_ACCESS_TOKEN)
    # upload a file to specific folder named benighil
    dbx.files_upload(open("screenshot.png", "rb").read(), "/screenshot.png")


    However, I am getting the following error:


    File "C:\Users\moham\Documents\python\02.python_exercices\venv\Lib\site-packages\dropbox\dropbox_client.py", line 631, in raise_dropbox_error_for_resp raise BadInputError(request_id, res.text) dropbox.exceptions.BadInputError: BadInputError('59bac010c7474111a1efc93977380357', 'Error in call to API function "files/upload": This app is currently disabled.')
    ​

    I created the app in dropbox (folder scoped) with necessary permission, but I don't know why I get the above error.

    PS: my issue is NOT the same Unknown API function: "files/upload

    Continue reading...

Compartilhe esta Página