Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
andrebruton
3 months agoExplorer | Level 3
Dropbox API 101
I'm trying to get a basic Dropbox API call going in PHP. I'm using the kunalvarma05/dropbox-php-sdk SDK.
I have a standard Dropbox account.
I registered an APP (Status: Development / Permission type: Scoped App(?)) I setup an APp Key and App Secret. I generated an Access Token.
I added permissions to the App, I just want to read files in a folder, download them and then delete them one by one.
I'm using the API explorer on https://dropbox.github.io/dropbox-api-v2-explorer/#files_get_metadata to test as my PHP code returns a Guzzle error: error":{".tag":"missing_scope","required_scope":"files.metadata.read"},"error_summary":"missing_scope/"
The API Explorer returns the same error with the Access Token inserted.
The Support Forums says I need to regenerate the Access Token as I added permissions. I tried to generate a new Access Token and got the error:
You must be a team administrator to perform this operation.
How must I re-generate the Access Token? I'm a single user Dropbox account. There is no one else. I tried to delete some of the App Permissions, but some are greyed out (makes no sense or logic) and I'm unable to change them.
Something so simple is so frustrating.
1 Reply
- DB-Des3 months ago
Dropbox Community Moderator
Hi andrebruton
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 or refresh tokens.
That being the case, to make any API calls that require that scope, you'll need to re-authorize the app to get a new access token (and refresh token, if being used) with that scope.
Refer to the OAuth Guide and authorization documentation for more information.Additionally, the error "You must be a team administrator to perform this operation." is displayed to individuals who are part of a Dropbox team, but do not have admin privileges, who are attempting to authorize an app with team scopes.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!