Python upload script

New post



  • Jozef Duhacek

    Curl does not work as well, what credentials should i use here?

    curl -i -X POST "" -H "Authorization: Bearer ???????????????? " -H "Content-Type: multipart/form-data" -F attributes='{"name":"test.txt", "parent":{"id":"159248921121"}}' -F file=@test.txt

    With Ansible or Trello it's easy, i just put my Oauth2 token, but here? I tried my apps developer token.

    HTTP/1.1 403 Forbidden
    Date: Fri, 25 Mar 2022 12:25:53 GMT
    Content-Length: 0
    Connection: keep-alive
    WWW-Authenticate: Bearer realm="Service", error="insufficient_scope", error_description="The request requires higher privileges than provided by the access token."
    X-Envoy-Upstream-Service-Time: 189
    Strict-Transport-Security: max-age=31536000


    Comment actions Permalink
  • Jozef Duhacek

    Your tool is garbage. I just need to upload reports from automation. Our company is going to switch to MS Onedrive, i am going to investigate the possibilities over there. Bye.

    Comment actions Permalink
  • Rohit Sangal


    In your curl example you can use a bearer token which is the access token. You can grab that from Box developer console. See or from

    In Python SDK, I see 2 upload (new_file = client.folder(folder_id).upload.upload('test.txt')
    ) not sure if that is a typo. If you can provide the complete file then I can run it in my environment and try to see the issue. You can upload it to Box and provide a link or I can raise a File request for you.



    Comment actions Permalink

Please sign in to leave a comment.