0

Please help me to suggest an idea to generate auth token without user needs to create the OAuth token. Using DropNet I Can download file using appkey,appsecret, oauthtokn. Already user needs to give the appkey and apptoken , on top of that user needs to launch the URL

https://www.dropbox.com/1/oauth2/authorize?client_id=***********&response_type=token&redirect_uri=http://localhost

and Click on Allow to perform the operation copy the access_token from the redirected url.

I want the user only needs to enter the appkey and appsecret. I want to generate access_token internally in the code either. Please suggest any way to achieve this.

Akshay Joy
  • 1,765
  • 1
  • 14
  • 23

1 Answers1

1

This can't be done. The app key and app secret identify an app, but not a user. Before you can access a user's Dropbox, that user will have to authorize your app.

(Also note that it's not typical for a user to provide an app key and secret... those are generally created once by the app developer.)

user94559
  • 59,196
  • 6
  • 103
  • 103
  • So you mean to say, I have created one App, using that any other user can access the my contents with their auth token... am really conufsing with the concept....... suppose I am the user and I am the one to download file using my own dropbox account, then Is there any way to achieve this? – Akshay Joy Apr 04 '14 at 17:06
  • Have you run any of the Dropbox sample apps? They each have their own app key and secret, and then you log in with your account and see *your* Dropbox. For an example, you can try this one right in your browser: https://dl.dropboxusercontent.com/u/182037406/js-datastore-api-task-example/index.html. – user94559 Apr 04 '14 at 17:58
  • :- thank you for the patience to explain this in detail. But still I am confusing the concept. See my requirement is I have created Dropbox App and got Appkey and AppSecret. If I want to download file from my Account I need to have pass three parameters according DropNet api, but my problem here Aith token is not constant value, this might be expire within a day or some hours. So to create auth token I need to launch some url with redirect url with appkey, I want to know how do I automcatically get the access token with my app key – Akshay Joy Apr 04 '14 at 18:45
  • No, the auth token will not expire. Effectively, it doesn't expire at all. (I believe that technically it expires in ten years, but I'm not entirely sure, and it's probably premature to worry about that. :-P) So a user of your app just needs to get the auth token once. – user94559 Apr 04 '14 at 19:43
  • Can u Please share the Email id or Facebook id..so that I can directly ask qn instead putting comments here – Akshay Joy Apr 04 '14 at 19:52
  • You can try the Dropbox API forum if you want more help: https://forums.dropbox.com/forum.php?id=5. – user94559 Apr 04 '14 at 20:13