We’re aware of an issue causing slower load times on the Dropbox Community forum. It should be resolved soon. Thanks for your patience! 

Forum Discussion

Slidersn21's avatar
Slidersn21
New member | Level 2
4 years ago

Dropbox-Uploader API - Upload Error

Hello, I have created an APP for API uploads and have given the APP read/write permissions for files.  I have run the dropbox configuration with my keys and tokens.

 

The command I run from my linux box is:

./dropbox_uploader.sh upload sr-s31-4.txt TAC/sr-s31-4.txt

 

The error I get is: 

Some error occurred. rerun the script with "-d" option and check the output and logfile: /tmp/du_resp_debug.'

 

I have attempted to format the upload command multiple ways but the error remains the same.

Here's the error output from debug when running with -d:

HTTP/1.1 100 Continue

 

HTTP/1.1 400 Bad Request

Cache-Control: no-cache

Content-Security-Policy: sandbox allow-forms allow-scripts

X-Content-Type-Options: nosniff

Content-Type: text/plain; charset=utf-8

Accept-Encoding: identity,gzip

Date: Fri, 01 Apr 2022 21:51:20 GMT

Server: envoy

Content-Length: 158

Strict-Transport-Security: max-age=31536000; includeSubDomains; preload

X-Robots-Tag: noindex, nofollow, noimageindex

Vary: Accept-Encoding

X-Dropbox-Response-Origin: far_remote

X-Dropbox-Request-Id: ee397548460f46b99728da9a31c68099

 

Error in call to API function "files/upload": Invalid authorization value in HTTP header "Authorization": "Bearer".  Expecting "Bearer <oauth2-access-token>"

 

 

1 Reply

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    4 years ago

    Based on the error output you shared, it looks like your app isn't setting the access token. That is, the "Authorization" header value should be "Bearer ACCESSTOKEN" (with ACCESSTOKEN being your actual access token), but the app is only sending "Bearer" (without an access token). You'll need to have the app set the access token in that header.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!