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

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

access token don't work

The access token generated in the app console does not work. The access token obtained from the call to / oauth2 / token does not work either. Instead, the access token generated in Dropbox API Explorer works great. Do you have any explanation and how do i get a valid access token?

  • Greg-DB's avatar
    Greg-DB
    3 years ago

    A 'path/not_found' error from /2/files/list_folder indicates that nothing was found at the specified "path" in the connected account. Note though that paths will be relative to the root for that call, which will depend on the access type of the app being used.

     

    For example, the API Explorer's own app is registered for "full Dropbox" access, and so can access anything in the connected account. It sounds like your app is registered for "app folder" access though, and so can only access the contents of the special app folder that gets created in the connected account (by default at "/Apps/<app name>" for accounts with the English locale).

     

    So if your app has the app folder access type, and you try to list the contents of a path "/folder", that will actually be trying to access a folder at "/Apps/<app name>/folder". If you need to access things outside of the app folder, such as a folder like "/folder" in the actual root of your account, you'll need to register an app for full Dropbox access and use that instead.

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

    I'll be happy to help with any issues you're having with the Dropbox API, but I'll need some more information. Please reply with:

    • the name and version number of the platform and SDK/library you are using, if any
    • the steps to reproduce the issue, including relevant code snippet(s), but don't include any access or refresh token(s)
    • the full text of any error or unexpected output
    • angelo_costantino's avatar
      angelo_costantino
      Explorer | Level 3

      Thanks for the support. I'm new to DropBox. I registered an application in the "App Console" and developed the application using REST technology to access DropBox services. My programming language is Delphi by Embarcadero. Following the instructions of "Dropbox for HTTP Developers" I requested the authentication code at the EndPoint "/ oauth2 / authorize" and I received the access token and the refresh token. I used the access token to request the list of files in my DropBox folder ("/ MyFolder") through the EndPoint "2 / files / list_folder" and I get the error: "{" error_summary ":" path / not_found / .. "," error ": {" .tag ":" path "," path ": {" .tag ":" not_found "}}}". If through my application I make the same request using the access token generated in the "https://dropbox.github.io/dropbox-api-v2-explorer/" environment, the request is successful and my application regularly receives the list of files in my DropBox folder. Can you explain this strange behavior to me?

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

        A 'path/not_found' error from /2/files/list_folder indicates that nothing was found at the specified "path" in the connected account. Note though that paths will be relative to the root for that call, which will depend on the access type of the app being used.

         

        For example, the API Explorer's own app is registered for "full Dropbox" access, and so can access anything in the connected account. It sounds like your app is registered for "app folder" access though, and so can only access the contents of the special app folder that gets created in the connected account (by default at "/Apps/<app name>" for accounts with the English locale).

         

        So if your app has the app folder access type, and you try to list the contents of a path "/folder", that will actually be trying to access a folder at "/Apps/<app name>/folder". If you need to access things outside of the app folder, such as a folder like "/folder" in the actual root of your account, you'll need to register an app for full Dropbox access and use that instead.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,882 PostsLatest Activity: 23 hours ago
326 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!