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

emeraldmedia's avatar
emeraldmedia
New member | Level 2
4 years ago

getting shared_folder_id

hey guys im trying to get shared_folder_id from the API and im using the below 

 

$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer ' . $auth_token, 'Content-Type: application/json'));
//curl_setopt($ch, CURLOPT_POSTFIELDS,json_encode($fields));
curl_setopt($ch, CURLOPT_URL, 'https://api.dropboxapi.com/2/sharing/list_folders');

 

try{
$result = curl_exec($ch);
} catch (Exception $e) {
echo 'Exception reçue : ', $e->getMessage(), "\n";
}
var_dump($result);

 

 

however all i get is :

 

Array ( [error_summary] => missing_scope/ [error] => Array ( [.tag] => missing_scope [required_scope] => sharing.read ) )

 

 

 

despite the app having sharing.read enabled 

 

 

thanks !

 

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

    The '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. Please refer to the OAuth Guide and authorization documentation for more information.

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!