Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

Muneebzzzz's avatar
Muneebzzzz
Explorer | Level 4
7 years ago

Invalid access token

I generated an access token while creating my project on dropbox app console, and used that token to let my user's to fetch data from my drobox using my android app, everything worked fine for months but today i was getting an exception that my access token is not valid, then i generated a new access token from app console and it again started working, now that my token is changed and is affecting my users as they have the old one.. i want to know what has happened and how my token becomes invalid, is the token got changed or what.. i have over 5k installs on google play and now my all users are affecting

14 Replies

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

    Yes, the app key and secret identify an app, and would be used in the OAuth app authorization flow. 

    More specifically, Dropbox actually supports two forms of the OAuth app authorization flow: "code" and "token", documented here. The "code" flow is generally intended for server-side apps, and requires both the app key and secret. The "token" flow is generally intended for client-side apps, and only requires the app key, and not the secret.

  • Muneebzzzz's avatar
    Muneebzzzz
    Explorer | Level 4
    7 years ago
    You explain so well Greg.. thanks alot for bearing me and giving your precious time :)
  • Muneebzzzz's avatar
    Muneebzzzz
    Explorer | Level 4
    7 years ago
    Actually iam not using app key in my code, only using access token
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    7 years ago

    That's correct, as you've described it, your current setup involves you embedding your access token itself in your app, not your app key or secret, since you are not using the OAuth app authorization flow.

    If you were to use the OAuth app authorization flow, you would need to embed your app key, if using the "token" flow, or your app key and secret, if using the "code" flow.

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!