Uploading files to Dropbox causing 400 error

Hi, I’ve set up a worklow that was working fine for several months but it’s started failing when trying to upload a file to Dropbox. I’m getting this error:
400 - “Error in call to API function \“users/get_current_account\”: Bad HTTP \“Content-Type\” header: \“application/x-www-form-urlencoded\”. Expecting one of \“application/json\”, \“application/json; charset=utf-8\”, \“text/plain; charset=dropbox-cors-hack\”.”

It looks like something has changed within Dropbox or the n8n app. Is there a solution I can use, or do I need to set up a direct API request to upload the file?

Thanks

This is usually a Dropbox API change or a node version mismatch. Try updating the n8n Dropbox node to the latest version first. If that doesn’t work, try recreating the credential (sometimes Dropbox revokes old auth tokens). The error suggests the node is sending form-data instead of JSON — a version update should fix that.

2 Likes

The error is happening because Dropbox has changed its API and now requires JSON or specific headers.

To fix this, update your Dropbox node in n8n to the latest version, set it to send data as JSON, and reconnect your account. If that doesn’t work, you can use a custom HTTP request to upload the file with the correct headers. This will let your workflow upload files without errors.

Thank you for your suggestions.

I’m using the n8n website. I’ve tried updating the Dropbox node, by deleting and re-adding it but I’m getting the same error.

I think the node itself needs updating to change the headers, I guess I can’t update that myyself.

I’ll look into using a custom HTTP request but it seems like a lot of extra work when the Dropbox node is right there :slight_smile: