How to get files / folder list from DropBox swift?

129 Views Asked by At

I am using below code and followed all configuration steps, but getting error only : "Unable to verify link request"

DropboxClientsManager.authorizeFromController(sharedWorkspace: NSWorkspace.shared,
                                              controller: self,
                                              openURL: { (url: URL) -> Void in
                                                NSWorkspace.shared.open(url)
                                              })


let scopeRequest = ScopeRequest(scopeType: .user, scopes: ["account_info.read"], includeGrantedScopes: false)
DropboxClientsManager.authorizeFromControllerV2(
  sharedWorkspace: NSWorkspace.shared,
  controller: self,
  loadingStatusDelegate: nil,
  openURL: {(url: URL) -> Void in NSWorkspace.shared.open(url)},
  scopeRequest: scopeRequest

)

1

There are 1 best solutions below

0
On

You're calling both authorizeFromController and authorizeFromControllerV2, but you should only be using one of them. Using both of them will prevent the SDK from being able to properly verify the process.

You should remove one of them. If you're using a "scoped" app, you should use authorizeFromControllerV2, which is preferred. Otherwise, if you're using a legacy app, you can use authorizeFromController.