cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We are making some updates so the Community might be down for a few hours on Monday the 11th of November. Apologies for the inconvenience and thank you for your patience. You can find out 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: 

Solution for Dropbox API where I have a non-standard setup.

Solution for Dropbox API where I have a non-standard setup.

chainsbomb
Explorer | Level 4

My app is single-page server-side javascript/HTML, but I don't use Node. This seems to mean that I can't just import {Dropbox} from 'dropbox'

 

I am able to access use the chooser and saver by using dropbox via script i.e. src="https://www.dropbox.com/static/api/2/dropins.js", but the functionality available to https://www.dropbox.com/static/api/2/dropins.js is limited. I need to be able to overwrite files with updated data without the user being required to manage files all the time.

 

The examples I see in Github seem to require libraries I can't find or are only available to those using Node or python.

 

I need my users to be able to save JSON data as a file on Dropbox, then be able to retrieve that data, converted back into JSON. The chooser and saver, while functional, are too much of a hassle for my users to constantly update. It's not a complicated plan, but access to the correct libraries and formats is a bit frustrating.

 

Any solutions for a purely no-frills javascript/HTML app?

10 Replies 10

Greg-DB
Dropbox Staff

@djschoch Check out the example here to see how to process the OAuth app authorization flow with the Dropbox JavaScript SDK to get an access token.

 

Dropbox issues short-lived access tokens which are valid for a few hours. You can get the exact expiration information from the API when it returns the access token, e.g., it would be available in 'response.result.expires_in' in the getAccessTokenFromCode callback in that example.

 

You can find more information on the authorization functionality in the OAuth Guide and authorization documentation.

Need more support?
Who's talking

Top contributors to this post

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