cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right 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: 

I'm struggleing to download a single file from the API

I'm struggleing to download a single file from the API

novaut
Explorer | Level 4
Go to solution

Hello there,

 

I'm struggleing to download a single file from the API.

 

I'm supplying the app key and secret for App Authentication but I'm getting this error:

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

 

I'm following the App Authentication example from https://www.dropbox.com/developers/reference/auth-types#app

 

Why it doesn't work? I just want to use the API in a simple way.

 

Thanks and all the best :slightly_smiling_face:

10 Replies 10

Здравко
Legendary | Level 20
Go to solution

@novaut wrote:

...

One question for how long refresh_token is alive? Is it long-lived? 

...


Hi @novaut,

Yes, it's long lived token. The refresh token remains valid till explicit revoke either from application itself or user that granted access for your application to its data.

 


@novaut wrote:

 ...

I successfully got the file from Dropbox using the refresh_token and it doesn't ask for http authentication :slightly_smiling_face:

...


You make me doubt you have understand everything correctly. You can download a file only with access token authentication, not directly with refresh token!!! The refresh token helps you keep receiving valid access token without further user actions. :winking_face: Hope this was just a confusion while typing.

Good luck.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Здравко Legendary | Level 20
  • User avatar
    novaut Explorer | Level 4
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?