cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

missing scope files.metadata.read

missing scope files.metadata.read

novotny
Explorer | Level 4
Go to solution

Hi,

 

I'm using the Java SDK and I have enabled files.metadata.read in my oermissions, see screenshot. However in my Java code I see:

 

com.dropbox.core.InvalidAccessTokenException: {"error_summary": "missing_scope/.", "error": {".tag": "missing_scope", "required_scope": "files.metadata.read"}}

 

What am I missing?

 

In addition I just copied from the java tutorial this line:

DbxRequestConfig config = DbxRequestConfig.newBuilder("dropbox/java-tutorial").build();

Which seems ok, what is the purpose of string "dropbox/java-tutorial" and I assume it can be any string?

 

Thanks, JasonScreenshot 2022-09-29 at 9.14.02 PM.png

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

A 'missing_scope' error indicates that while the app is permitted to use that scope, the particular access token you're using to make the API call does not have that scope granted. Also, be aware that just adding a scope to your app via the App Console does not retroactively grant that scope to existing access tokens.

That being the case, to make any API calls that require that scope, you'll need to get a new access token with that scope.

Refer to the OAuth Guide and authorization documentation for more information.

 

The string you pass to DbxRequestConfig.newBuilder should be a name identifying your app. That doesn't control the scopes.

View solution in original post

2 Replies 2

Greg-DB
Dropbox Staff
Go to solution

A 'missing_scope' error indicates that while the app is permitted to use that scope, the particular access token you're using to make the API call does not have that scope granted. Also, be aware that just adding a scope to your app via the App Console does not retroactively grant that scope to existing access tokens.

That being the case, to make any API calls that require that scope, you'll need to get a new access token with that scope.

Refer to the OAuth Guide and authorization documentation for more information.

 

The string you pass to DbxRequestConfig.newBuilder should be a name identifying your app. That doesn't control the scopes.

timrobinson33
Explorer | Level 4

Thanks - this is what I had missed first time:

 


That being the case, to make any API calls that require that scope, you'll need to get a new access token with that scope.

for any other newbies getting confused by this, after adding permissions in the permissions tab, you need to go back to the settings tab and generate another access token

 

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    timrobinson33 Explorer | Level 4
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?