Forum Discussion

Pawan A.'s avatar
Pawan A.
New member | Level 1
11 years ago

Authenticate internaly with dropbox through my app

Hello Everyone,
I have a photo studio app in this app

I want to user can upload them photos on my drop box folder through my app without registering on dropbox. When they upload photo through my app,My app should login internaly with my drop box credential without user intrection.
Thanks in adavance

10 Replies

Replies have been turned off for this discussion
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    11 years ago

    The Dropbox API was designed with the intention that each user would link their own Dropbox account, in order to interact with their own files. However, it is technically possible to connect to just one account. The SDKs don't offer explicit support for it and we don't recommend doing so, for various technical and security reasons.

    However if you did want to go this route, instead of kicking off the authorization flow, you would manually use an existing access token for your app. (Just be careful not to revoke it, e.g. via https://www.dropbox.com/account/security .)

  • juan g.2's avatar
    juan g.2
    New member | Level 1
    11 years ago

    Even being very insecure want to do this, but it still fails authentication.
    Is there any example code for this task?

    Sorry my English, Thanks

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    11 years ago

    No, we don't have any sample code for this, since it isn't recommended. What error do you get?

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    11 years ago

    It looks like you're checking authenticationSuccessful but this only returns true during an actual app authorization flow. However, since you're setting your access token manually, this doesn't apply. You can used isLinked to check if you have an access token set instead:

    https://www.dropbox.com/static/developers/dropbox-android-sdk-1.6.3-docs/com/dropbox/client2/session/Session.html#isLinked()

    Note that this doesn't validate the access token against the server though. If the access token has been revoked, later API calls will fail.

  • juan g.2's avatar
    juan g.2
    New member | Level 1
    11 years ago

    Well he was right, now goes well but I have another dilemma ...
    No files get access here, notice in my codigome fails in
    Entry entry = mDBApi.metadata ("/ dropfiles.dat", 1, null, false, null);

    my code:
    http://pastebin.com/ufJ8Vda7

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    11 years ago

    How does it fail? (What's the error/stack?)

  • juan g.2's avatar
    juan g.2
    New member | Level 1
    11 years ago

    Ups! If the error was that, thank you very much for your help, I will continue with my development

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!