Comments
-
What language is this? What library? Are you using OAuth 1 (with HMAC signing or PLAINTEXT?) or OAuth 2? Could you share some code?
-
In both of the cases you mention, the app shows up in the App Console (https://www.dropbox.com/developers/apps). If a user links an app (by going through the OAuth flow), then the app will also show up in the user's list of apps (https://www.dropbox.com/account/security). When a user first link an App folder app, a folder…
-
What exactly were you expecting to show up on your desktop? Creating an app doesn't cause any files or folders to be created. If the app has "App folder" permissions, then once you (or any other user) link to the app, you'll see an app folder getting created (something like Dropbox/Apps/<app name>).
-
Velmurugan, please post a new question instead of replying to an old thread.
-
My advice would be to not use Dropbox. The Dropbox API is primarily meant to be used in apps where each user will access his or her own account.
-
I mean that if a user wants to get the access token, they can just run an HTTP proxy (like Fiddler2) and see the Authorization header your app is sending to Dropbox. The access token will be plainly visible there. My general point is that if you put the access token in the app, users can get it.
-
If the access token is in the exe file, it can definitely be extracted. (As a potentially easier alternative, a user could just set up an HTTP proxy and look at the Authorization header.)
-
You could do this, but I would advise against it. Dropbox isn't designed for this kind of account sharing, and anyone who had access to your app would be able to extract the access token and take control of the account (e.g. delete all the files).
-
Once a user has authorized your app (the first time they use it), you should keep reusing the same access token from then on. But you can't hardcode the access token in the app, because it will be different for each user.
-
A user has to grant your application permission before it can access that user's Dropbox. There's no way to do that without the user interacting with dropbox.com (or the Dropbox app on mobile). But once a user has authorized your app once, they never need to do it again.
-
Any of the SDKs (ours or third-parties) should be able to read text files from Dropbox.
-
It looks like you're using this library: https://github.com/saguiitay/DropboxRestAPI. You might consider asking the author for help. The "authorization code" is generally what gets displayed when you browse to https://www.dropbox.com/1/oauth2/authorize?response_type=code&client_id=<YOUR-APP-KEY>. It looks like…
-
One guess: you copied a sqlite file that was still in use by some other process, and not all the data was in the main sqlite file. (See https://www.sqlite.org/tempfiles.html for other files that may be involved). As a next step, I'd suggest you check and log the size of the sqlite file right before uploading to Dropbox.…
-
"Authorization code" and "access token" are two different things. You were trying to reuse an authorization code, which won't work. Now you're reusing an access token, which will work. (Access tokens are meant to be reused indefinitely.)
-
The exception is correct... you're trying to reuse an authorization code that's already been used. An authorization code can only be used once (and within a limited time period). What you need to do is reuse the access token. Once you have an access token, your code can just be this: DbxClient client = new…
-
The tutorial shows how to go through the auth flow in a command-line app (https://www.dropbox.com/developers/core/start/java), and as it says, you can just store the access token for future use: The access token is all you'll need to make API requests on behalf of this user, so you should store it away for safe-keeping…
-
What exactly do you mean by "provide authorization automatically?" You certainly can't access a user's Dropbox without that user's permission. The Dropbox API uses OAuth to get a user's permission. Once the user has authorized your app, you can access their Dropbox. Each user of your app should only need to authorize the…
-
The typical use of the Dropbox API is for when your app needs to read and write files in a user's Dropbox, not your own account. The use you describe here seems like a better use case for something like S3, which, for example, doesn't have bandwidth limits (like Dropbox does). Here are Heroku's docs on using S3:…
-
Abhishek, if two different users have a file at the same path, you can tell the difference between these files by looking at the user who owns the file (typically via the "member ID" in the Dropbox for Business API).
-
I'm not sure what's going wrong in your code, so I thought I'd instead provide some working code I wrote for you. The method below returns the full URI to download a thumbnail from Dropbox. Note that I'm not using OAuthBase.GenerateSignature. That method returns a URL-encoded version of the signature, which I found hard to…
-
Everything looks roughly right (in the first URL), so I would assume that one of the parameters is wrong (oauth_consumer_key, oauth_token, or oauth_signature). Compare those values to the URL you use for /media (the one that's working) to make sure everything's the same.
-
It looks like this code tries two different calls, one in which the file path is manually URL encoded and one in which it isn't. Why is that? Maybe you can print out the value of "url" right before you make the call and share that, but please remember to replace the OAuth signature with Xs so you don't share your…
-
Can you share your latest code for retrieving thumbnails?
-
Are you still having trouble, or is your code working now?
-
Another issue I noticed: the first code snippet passes drive.AccessToken and drive.RefreshToken. Dropbox doesn't use a refresh token. Presumably you should be passing the access token secret as the second parameter.
-
Both code snippets use AppConstants.DropBox_GetThumbnail. So they both seem to be requesting thumbnails.
-
What's the value of AppConstants.DropBox_GetThumbnail?
-
I'm confused. What's the difference between DriveUtilities.GenerateSignature and DriveUtilities.GenerateThumbviewSignature? And why does one piece of code use item.serverFileId and the other path? (Is the "serverFileId" the path?) And both snippets seem to use AppConstants.DropBox_GetThumbnail as the base URL, but I…
-
Please share code for a call that works (something other than /thumbnails) and a call that doesn't work (/thumbnails).
-
So you're still getting an "unauthorized error" message? Is this on all paths or still just the ones that include parentheses? Are you still using HMAC signing, or have you switched to PLAINTEXT? Is it only /thumbnails that fails, or do other endpoints also fail?