You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

iosenqa's avatar
iosenqa
Explorer | Level 4
6 years ago

Unable to upload the file via API

Unable to upload the files using API , see the Poster screenshot for paramaters and Body. Any help would be really appreciated. Seeing below error :  Error in call to API function "files/upload": B...
  • Greg-DB's avatar
    6 years ago

    The Dropbox API /upload endpoint does require that the HTTPS request use one of the Content-Type values listed in the error message you shared.

    I see that you are attempting to set a valid Content-Type value, but the actual request is using a different value ("multipart..."). It seems that the HTTPS client you're using is overriding the value you're attempting to set.

    You should refer to the documentation for the client you're using to determine how to disable that behavior. For instance, you likely will want to use the "binary" option seen in the screenshot of the "Body" tab you shared. 

    Also, note that some of your other headers look incorrect as well. The Dropbox API parameters should be sent as JSON in a single "Dropbox-API-Arg" header, not in separate "mode", "autorename", etc. headers like you have. You can find more information and an example in the documentation.