We Want to Hear From You! What Do You Want to See on the Community? Tell us here!
Forum Discussion
kondotto
5 years agoExplorer | Level 3
scoped app with app folder vs scoped app - same permissions but scoped app will not upload file
I have created 2 Dropbox Apps.
One of them is a scoped app with an app folder, and the other is a scoped app which allows complete access to all files in the account.
The permissions are identical, but when I try to upload a file using their own respective access tokens, the scoped app with an app folder works, but the scoped app which has completes access returns an error "scope conflict".
4 Replies
- Greg-DB5 years ago
Dropbox Community Moderator
Can you share the code you're using for the upload, as well as the full error/output so I can take a better look at what's happening here? Thanks in advance!
- kondotto5 years agoExplorer | Level 3Thanks Greg. Here is the code. I'll send the exact error message shortly. Public Shared Sub UploadFile(dropboxfilepath As String, windowsfilepath As String, ByRef errormessage As String, accesstoken As String) errormessage = "" Using dc As New DropboxClient(accesstoken) Using body As New IO.FileStream(windowsfilepath, IO.FileMode.Open) Dim ias As IAsyncResult = Nothing Try ias = dc.Files.BeginUpload(dropboxfilepath, Files.WriteMode.Overwrite.Instance, False, Nothing, True, Nothing, False, body) Catch ex As Exception errormessage = ex.Message End Try If errormessage.Length = 0 Then Try Dim fmd As Dropbox.Api.Files.FileMetadata = dc.Files.EndUpload(ias) Catch ex As Exception errormessage = ex.Message End Try ias = Nothing End If End Using End Using End Sub
- kondotto5 years agoExplorer | Level 3Greg - I received a different error message when trying regenerate the error to upload a file in the "full dropbox" app. It told me that the Access Token had expired, even though I set them not to expire. When I tried to regenerate the Access token, it generated the following message:- "You must be a team administrator to perform this operation". However I did not get have this restriction for the first "full app" that I created. So I created a brand new full app and started from scratch. I could still not generate the access token. Our account is "basic". It does not have Teams. Does that mean I should not be allowed to create a full app in the first place ?
- Greg-DB5 years ago
Dropbox Community Moderator
Any access token that starts with "sl." is "short-lived", meaning that it will expire after four hours. Did you perhaps change the expiration setting after retrieving the access token? That wouldn't retroactively affect existing access tokens.
You can certainly create and use a "Full Dropbox" app from a non-team account. As for the "You must be a team administrator" error though, that indicates that you selected one or more "team" scopes, which can only be authorized by a team admin. You should deselect any "team scopes" and try again. Also, note that the 'files.permanent_delete' scope automatically requires the 'team_data.member' scope, so you can't use 'files.permanent_delete' from a non-team account. If you selected that, you should uncheck 'files.permanent_delete' and 'team_data.member', submit those changes, and then try generating a token again.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,036 PostsLatest Activity: 2 days ago
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 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!