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.

Discuss Dropbox Developer & API

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

Re: Error (400) when open dropbox (request URL)

Error (400) when open dropbox (request URL)

Andika Scofield
Explorer | Level 4
Go to solution

Hello,

 

I found a problem when trying to request URL.

I have two apps in dropbox:

  1.  App 1 (status=production), use Permission type = Full Dropbox

  2. App 2 (status=development), use Permission type = Scope App

 

I've implemented short-lived token in App 2 (Scope App). I add all scope in scope requests according to permission in App 2.

DBScopeRequest *scopeRequest = [[DBScopeRequest alloc] initWithScopeType:DBScopeTypeUser
                                                                    scopes:@[@"account_info.read", "files.metadata.write", "files.metadata.read", "files.content.write", "files.content.read", "sharing.write", "sharing.read", "file_requests.write", "file_requests.read", "contacts.write", "contacts.read"]
                                                      includeGrantedScopes:NO];

When use the code above, my app success to show the login page.

But when I use the code above to App 1 (Full Dropbox). I get the error page ("scope": must be at most 0 characters, got 192)

 

Why that's happened? is it because App 1 is already "full dropbox"?
I've tried to delete all scope in scope requests, and can open sign in page. Can you explain?

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

Yes, Dropbox is in process of migrating all apps to use scopes. This is a backwards compatible migration; scoped apps can use all of the same functionality as non-scoped apps. Scopes just offer more granularity in the control over which functionality you enable for the app. You can find more information on the migration in this blog post.

View solution in original post

7 Replies 7

Greg-DB
Dropbox Staff
Go to solution

You can only specify 'scopes' when using an app that is registered as a "scoped" app. Your app 1 is not scoped, so you can't specify scopes for it. You should migrate it to be a scoped app via the "Permissions" tab of the app's page on the App Console.

Andika Scofield
Explorer | Level 4
Go to solution
Is this an obligation to migrate from "full dropbox" into "scoped app"?

Greg-DB
Dropbox Staff
Go to solution

Yes, Dropbox is in process of migrating all apps to use scopes. This is a backwards compatible migration; scoped apps can use all of the same functionality as non-scoped apps. Scopes just offer more granularity in the control over which functionality you enable for the app. You can find more information on the migration in this blog post.

Andika Scofield
Explorer | Level 4
Go to solution

Thank you @Greg-DB 

I have a question again.

 

After migration, there are two scopes; individual scopes and teams scopes.

My application already selects individual scope automatically. 

But I don't know what is team scope, why is there a difference between team and individual?

Greg-DB
Dropbox Staff
Go to solution

Individual scopes enable access to functionality relevant to any account. Team scopes enable access to functionality specific to Business teams only. Team scopes can only be authorized by team admins. You can see which scope is required for each endpoint in the API documentation, e.g., for the user endpoints, which require individual scopes, and for the Business endpoints, which require team scopes.

Andika Scofield
Explorer | Level 4
Go to solution
After migration, teams scope didn't selected automatically. It means that my application before doesn't support business teams?

Greg-DB
Dropbox Staff
Go to solution

When migrating a non-scoped app to scopes, the page will automatically select the scopes that match the legacy permission type of the app. (From there you can enable or disable scopes as needed.) For example, for a full Dropbox or app folder app, that will automatically include user scopes but not team scopes, since those permissions are only used-linked, not team-linked. Team scopes enable access to functionality specific to teams, such as adding or removing members.

 

This does not indicate that your app did not allow Business accounts. Business accounts could and can still be linked to those legacy user-linked app types as well as scoped apps with user scopes to use the user-linked functionality, just like any other account type.

Need more support?