We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
HELPHELPHELP
7 years agoExplorer | Level 4
Dropbox for Business with SwiftyDropbox integration
Hello,
I am moving my iphone app from a test account with personal dropbox to dropbox for business with team members. This seems to be quite the jump and the documentation is minimal for this parti...
- 7 years ago
If the code doesn't seem to be running or responding, I recommend stepping through with the debugger first to determine where it's breaking down.
For instance, in the code sample I shared, 'DropboxClientsManager.authorizedTeamClient' needs to be set, in order to make the API calls. That gets set during the authorization process for the Business API app. Is it properly set when you try to make the calls?
Looking at the code you shared for the authorization process, it looks like you are still using the user methods, instead of the team methods. That is, per the docs here, in this case you should use 'setupWithTeamAppKey' instead of 'setupWithAppKey', and 'handleRedirectURLTeam' instead of 'handleRedirectURL'.
HELPHELPHELP
7 years agoExplorer | Level 4
So I tried your code and I get no response. It must be before this that I am causing the issue. It isn't much though.
This is my current method to Authorize. should I be doing this different
AppDelegate:
DropboxClientsManager.setupWithAppKey("App_Key")UIButtonAction:
DropboxClientsManager.authorizeFromController(UIApplication.shared, controller: self, openURL: { (url: URL) -> Void in UIApplication.shared.open(url, options: [:], completionHandler: nil) })
Any ideas? Thanks so much.
Greg-DB
Dropbox Community Moderator
7 years agoIf the code doesn't seem to be running or responding, I recommend stepping through with the debugger first to determine where it's breaking down.
For instance, in the code sample I shared, 'DropboxClientsManager.authorizedTeamClient' needs to be set, in order to make the API calls. That gets set during the authorization process for the Business API app. Is it properly set when you try to make the calls?
Looking at the code you shared for the authorization process, it looks like you are still using the user methods, instead of the team methods. That is, per the docs here, in this case you should use 'setupWithTeamAppKey' instead of 'setupWithAppKey', and 'handleRedirectURLTeam' instead of 'handleRedirectURL'.
About Discuss Dropbox Developer & API
Make connections with 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!