You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

OLIM's avatar
OLIM
Explorer | Level 3
3 years ago

get Auth token with AppKey and Appsecret error

Why did the freaks remove the possibility of eternal tokens? now we'll have to look for another service, redo all the applications.

  • OLIM's avatar
    OLIM
    Explorer | Level 3

    does anyone have a real example of getting a token of this ugly service, these have all the examples in curl

    • Здравко's avatar
      Здравко
      Legendary | Level 20

      Hi OLIM,

      I'm not sure what you ask for actually, but your example has nothing to do about tokens. There Basic authentication is used and it's something specific to this type of authentication, not just something Dropbox specific, and has always been performing using base64 encoding. You can't just concatenate the things!

      About tokens, new issued access token is always short lived. There was time when long lived access token used to issue and such tokens, if you have some, are still usable, but are deprecated currently. If you want long lived access you need refresh token. It doesn't expire automatically. Take a look here for more info.

      Hope this helps.

      • OLIM's avatar
        OLIM
        Explorer | Level 3

        give me a real example for getting a token if you are truthful. For example, in VBA. curl it is not possible to run on the client machine. It doesn't work with EncodeBase64 either, if that's what you're talking about.

  • OLIM's avatar
    OLIM
    Explorer | Level 3

    Hi there. I didn't find a way to generate a token, I accidentally deleted the old eternal token, now it can't be restored. And new tokens live for 4 hours. All software and applications have stopped working, customers are complaining. It is clear that I'have to find another service for applications. But I haven't found yet, do you know a third-party service that would pull tokens from the dropbox by Appkey and AppSecret. My applications are installed on devices that do not have access to the browser, it is required that the application does not require authorization data. Everything should be sewn in. And this is impossible with the current policy of Dropbox.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    Dropbox is no longer offering the option for creating new long-lived access tokens. Dropbox is switching to only issuing short-lived access tokens (and optional refresh tokens) instead of long-lived access tokens. You can find more information on this migration here.

    Apps can still get long-term access by requesting "offline" access though, in which case the app receives a "refresh token" that can be used to retrieve new short-lived access tokens as needed, without further manual user intervention (that is, once the user authorizes the app once, they don't need to authorize the app in their browser again). You can find more information in the OAuth Guide and authorization documentation. There's a basic outline of processing this flow in this blog post which may serve as a useful example.

     

    While short-lived access tokens are temporary, refresh tokens are long-lived and don't expire automatically, like the previous long-lived access tokens. So, you can store and re-use refresh tokens like you may have previously done with long-lived access tokens. For reference, both with the process for previous long-lived access tokens and new short-lived access tokens/refresh tokens, note the "authorization codes" have and continue to be temporary single-use codes used during the authorization process.

     

    As for examples, the HTTP documentation has examples shown in curl, but you can translate that for whatever platform you need. And for prototyping and trying out specific API calls, the API v2 Explorer can be helpful. It can even show you how the request would be formatted in multiple contexts, such as in Python or raw HTTP, if you click "Show Code". There are also official SDKs listed here, which each come with some examples.

     

    Also, "oauth1_token" and "oauth1_token_secret" are parameter names for use with /2/auth/token/from_oauth1 only. That is only needed if you have previous OAuth 1 access tokens from the now-retired API v1 and need to convert them to OAuth 2 for API v2. It sounds like that's not the case in your scenario though so you shouldn't be using "oauth1_token" and "oauth1_token_secret" or /2/auth/token/from_oauth1.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,910 PostsLatest Activity: 3 days ago
333 Following

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 or Facebook.

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!