dropbox-sdk-js | The Official Dropbox API V2 SDK for Javascript | SDK library
kandi X-RAY | dropbox-sdk-js Summary
kandi X-RAY | dropbox-sdk-js Summary
The offical Dropbox SDK for Javascript. Documentation can be found on GitHub Pages.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of dropbox-sdk-js
dropbox-sdk-js Key Features
dropbox-sdk-js Examples and Code Snippets
{
"data": [{
"type": "users",
"attributes": {
"admin": true,
"email": "ghopper@example.com",
"name": "Grace Hopper"
}
}]
}
{
"data": [{
"type": "storages",
"attributes": {
"apiVersion": "2",
"n
const
dbxservices = require('./dbxservices'),
config = require('./config'),
store = require('./redismodel');
//Renders the gallery UI with the first set of images
//It always starts over and resets cursors
module.exports.gallery = async (req,res,ne
DBX_LIST_FOLDER_PATH:'/2/files/list_folder',
DBX_LIST_FOLDER_CONTINUE_PATH:'/2/files/list_folder/continue',
DBX_GET_TEMPORARY_LINK_PATH:'/2/files/get_temporary_link',
/*Gets temporary links for a set of files in the root folder of the app
It is a tw
using System;
using System.Net;
using System.Threading.Tasks;
using Xamarin.Forms;
using Android.Content;
using Android.App;
using Plugin.CurrentActivity;
using MyApp.Droid.DropboxAuth;
using AndroidX.Activity;
[assembly: Dependency (t
/**
* Upload file to Dropbox
*
* @function
* @param {FILE_DATA} fileData - file data to be stored
* @returns {Promise<{fileName: string, folderUUID: string, isSucceeded: boolean, message: string}>>} file upload result
*/
exp
Sub Button1_Click()
Dim AcroApp As Acrobat.CAcroApp
Dim Doc1 As Acrobat.CAcroPDDoc
Dim Doc2 As Acrobat.CAcroPDDoc
Dim numPages As Integer, boolNotSaved As Boolean
Dim boolReplace As Boolean, boolDelInsert As Boolean
attribute #1: awsRoles
attribute #1 value: arn:aws:iam::ACCOUNT_NUMBER:role/shibbolethidp,arn:aws:iam::ACCOUNT_NUMBER:saml-provider/Shibboleth-IdP
attribute #2: awsRoleSessionName
attribute #2 value: winston.hong@example.com
Microsoft Office 365
Google G Suite
Salesforce
Dropbox
Box
Amazon AWS
OpenStack
Citrix NetScaler
VMware vCloud Director
Oracle NetSuite
$git clone https://github.com/winstonhong/Shibboleth-SAML-IdP-and-SP
Microsoft Office 365
Google G Suite
Salesforce
Dropbox
Box
Amazon AWS
OpenStack
Citrix NetScaler
VMware vCloud Director
Oracle NetSuite
Microsoft Office 365
Google G Suite
Salesforce
Dropbox
Box
Amazon AWS
OpenStack
Citrix NetScaler
VMware vCloud Director
Oracle NetSuite
Community Discussions
Trending Discussions on dropbox-sdk-js
QUESTION
For a while now I've been using dropbopx-sdk-js in a Meteor application without any trouble.
My Meteor app simply uses Dropbox to fetch images to be used in product cards. These files are synced now and then and that's it. 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)
End users do not remove nor add files, nor are the files related to an end user specific account.
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.
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.
Now, checking Dropbox's Authentication Types it seems to me like "App Authentication"
"This type only uses the app's own app key and secret, and doesn't identify a specific user or team".
is what I'm after. I can safely provide app key and secret in the server exclusively, as the client will never need those. 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)
In the js-sdk examples repo, I only found this example using app key and secret. Yet afterwards it goes through the oauth process in the browser anyways. If I don't do the oauth part, I get an error
...ANSWER
Answered 2022-Mar-10 at 22:23The short answer is:
You need to obtain a refresh-token. You can then use this token for as long as you want. But in order to get it is necessary to go through at least one oauth flow in the browser. Then capturing the generated refresh-token in the backend. Then store it and use it to initialize the API. So it's kind of "hacky" (IMO).
For 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 use that value as a constant to immediately call the setRefreshToken
method (as done in that very same line) upon initialization.
The long answer is:
- ClientId + Client secret are not enough to programmatically generate a refresh token.
- Going through the oauth flow at least once is mandatory to obtain a refresh token
- If you want to hide such flow from your clients, you'll need to do what the short answer says.
- The intended flow of usage according to Dropbox is: each user access his own files. Having several users accessing a single folder is not officially supported.
The longer answer is:
Check out the conversation we had in the dropbox forum
I suggested to replace the "Generate Access Token" button in the console for a "Generate Refresh Token" button instead. At least it made sense to me according to what we discussed. Maybe if it gets some likes... ;).
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install dropbox-sdk-js
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page