doublewhe.blogg.se

Dropbox api v2 javascript
Dropbox api v2 javascript












dropbox api v2 javascript

Having several users accessing a single folder is not officially supported.Ĭheck out the conversation we had in the dropbox forum

dropbox api v2 javascript dropbox api v2 javascript

  • The intended flow of usage according to Dropbox is: each user access his own files.
  • If you want to hide such flow from your clients, you'll need to do what the short answer says.
  • Going through the oauth flow at least once is mandatory to obtain a refresh token.
  • ClientId + Client secret are not enough to programmatically generate a refresh token.
  • Then use that value as a constant to immediately call the setRefreshToken method (as done in that very same line) upon initialization. So it's kind of "hacky" (IMO).įor example, you can use the mentioned example code, and log/store the obtained refresh token in this line (as per Greg's accepted answer in the forum). Then store it and use it to initialize the API. Then capturing the generated refresh-token in the backend. But in order to get it is necessary to go through at least one oauth flow in the browser. You can then use this token for as long as you want. If I don't do the oauth part, I get an error Yet afterwards it goes through the oauth process in the browser anyways. In the js-sdk examples repo, I only found this example using app key and secret.

    dropbox api v2 javascript

    The question is how do I achieve such kind of authentication? Or for that matter, how do I achieve an equivalent of the long-lived token for my app, ultimately meaning that end users don't actually need to know Dropbox is behind the scenes in any way (and they surely don't need dropbox accounts to use this app nor should be prompted with any Dropbox authentication page) I can safely provide app key and secret in the server exclusively, as the client will never need those. "This type only uses the app's own app key and secret, and doesn't Now, checking Dropbox's Authentication Types it seems to me like "App Authentication" Now I've tried to replicate that very same thing in a new similar project, but found that the permanent tokens have been recently deprecated and are no longer an option. To achieve this, I created (in the far past) an App in the Dropbox App Console, generated a permanent token, and used that token in my Meteor app to handle all the syncing. By synced what I mean is they are scanned, shared links created or obtained, and some info is then saved in Mongo (name, extension, path, public link)Įnd users do not remove nor add files, nor are the files related to an end user specific account. These files are synced now and then and that's it. My Meteor app simply uses Dropbox to fetch images to be used in product cards. For a while now I've been using dropbopx-sdk-js in a Meteor application without any trouble.














    Dropbox api v2 javascript