cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Tell us what you want to see on the Community here!
Close

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: 

Authentication for File getContent - https://content.dropboxapi.com/2/cloud_docs/get_content

Highlighted

Authentication for File getContent - https://content.dropboxapi.com/2/cloud_docs/get_content

Explorer | Level 3

Hi,

While cosumning the api to get the file content ( https://content.dropboxapi.com/2/cloud_docs/get_content).

I am facing an error mentioned below:

 

Error in call to API function "cloud_docs/get_content": Invalid authorization value in HTTP header "Authorization": "Bearer <myApp access token>". Expecting "Bearer cd.<auth_token>". '// Here in myApp access token I have provide the app access token.

 

Am I passing the correct token?, as in the description of this service I saw one information "Please make a request to cloud_docs/authorize and supply that token in the Authorization header". But I did not find any information on that.

 

Please help in this regard.

 

 

1 Accepted Solution

Accepted Solutions
Highlighted

Re: Authentication for File getContent - https://content.dropboxapi.com/2/cloud_docs/get_content

Dropboxer

The /2/files/download endpoint is a "content-download" style endpoint, meaning it expects the parameters in the 'Dropbox-API-Arg' request header, not the request body. 

 

You're sending your parameters in the request body, so it's returning that error. Move your parameter JSON to the 'Dropbox-API-Arg' request header instead.

View solution in original post

4 Replies 4
Highlighted

Re: Authentication for File getContent - https://content.dropboxapi.com/2/cloud_docs/get_content

Dropboxer

If you're trying to download file content, you should instead use /2/files/download, for normal files, or /2/files/export, for things that can't be downloaded normally. 

 

Please refer to the documentation linked above for more information and examples.

Highlighted

Re: Authentication for File getContent - https://content.dropboxapi.com/2/cloud_docs/get_content

Explorer | Level 3

Hi Greg,

 

I tried the api https://content.dropboxapi.com/2/files/download, but seeing an unsual error.

Error in call to API function "files/download": The request body is supposed to be empty, but it isn't; got "{\x0D\x0A \"path\": \"/IssueTrackerV4.xlsx\"\x0D\x0A}".

 

Not sure what is the issue. My request bod has below content:

{
    "path""/IssueTrackerV4.xlsx"
}
Highlighted

Re: Authentication for File getContent - https://content.dropboxapi.com/2/cloud_docs/get_content

Dropboxer

The /2/files/download endpoint is a "content-download" style endpoint, meaning it expects the parameters in the 'Dropbox-API-Arg' request header, not the request body. 

 

You're sending your parameters in the request body, so it's returning that error. Move your parameter JSON to the 'Dropbox-API-Arg' request header instead.

View solution in original post

Highlighted

Re: Authentication for File getContent - https://content.dropboxapi.com/2/cloud_docs/get_content

Explorer | Level 3

Hi Greg, Thanks a lot. It worked.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?