cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dropbox-Uploader API - Upload Error

Dropbox-Uploader API - Upload Error

Slidersn21
New member | Level 2

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 1

Greg-DB
Dropbox Staff

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.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?