cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Musicians, convert your MuseScore files to PDF to play music on the go! Learn more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: access token don't work

access token don't work

angelo_costantino
Explorer | Level 3
Go to solution

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?

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

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.

View solution in original post

3 Replies 3

Greg-DB
Dropbox Staff
Go to solution

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
Explorer | Level 3
Go to solution

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
Dropbox Staff
Go to solution

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.

Need more support?