cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

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

Re: createSharedLinkWithSettings -> sessionDeinitialized error

createSharedLinkWithSettings -> sessionDeinitialized error

petepete717
Helpful | Level 6
Go to solution

I am attempting to obtain the link to share a folder but I always receive a sessionDeinitialized error.

 

Setup:

 

struct DropboxManager {

    var client: DropboxClient {

        let client = DropboxClient(accessToken: "sl.myAccessToken")

        return client

    }

 

    func shareFolder() {

        client.sharing.createSharedLinkWithSettings(path: "/MyTestPath").response { response, error in

            if let link = response {

                print(link.url)

            } else {

                print("Error sharing:", error)

            }

        }

    }

}

 

Seems like I am missing something here? Is it possible I can't test sharing when setting up the client with the access token?

I have tested that the client works - I'm able to up- and download files to Dropbox.

 

Thanks for guiding me in the right direction.

1 Accepted Solution

Accepted Solutions

petepete717
Helpful | Level 6
Go to solution

I hope this helps others with the same issue -

 

Logging into Dropbox with the access token does not work. I need to go through the "normal" authorization process, first defining a ScopeRequest, including the scope "sharing.write". Afterwards using 

DropboxClientsManager.authorizeFromControllerV2(......

 

View solution in original post

1 Reply 1

petepete717
Helpful | Level 6
Go to solution

I hope this helps others with the same issue -

 

Logging into Dropbox with the access token does not work. I need to go through the "normal" authorization process, first defining a ScopeRequest, including the scope "sharing.write". Afterwards using 

DropboxClientsManager.authorizeFromControllerV2(......

 

Need more support?