I have an application that should put a directory in de dropbox-Photos directory.
Once the directory is created and synchronized, the application needs the
Public gallery Link ( which you can manually find by a right-click on the directory). Then, the application will send automatically an email to the customer with this link to his directory.
I’ve done some research with the SharpBox API but I don’t know how to find the Public gallery link.
Here is my code (Visual Studio 2008, SharpBox V22.214.171.1242)
As New CloudStorage()
Dim dropBoxConfig As DropBoxConfiguration = CloudStorage.GetCloudConfigurationEasy(nSupportedCloudConfigurations.DropBox)
Dim accessToken As ICloudStorageAccessToken =
Dim fs As
New IO.FileStream("<<MyTokenFile>>", FileMode.Open, FileAccess.Read, FileShare.None)
accessToken = dropBoxStorage.DeserializeSecurityToken(fs)
Dim root As ICloudDirectoryEntry = dropBoxStorage.GetRoot
Dim Photos_Map As ICloudDirectoryEntry = dropBoxStorage.GetFolder("/Photos")
For Each fsentry
As ICloudFileSystemEntry In Photos_Map
If fsentry.GetType.Name =
Dim map As ICloudDirectoryEntry = fsentry
Dim My_Uri As System.Uri = DropBoxStorageProviderTools.GetPublicObjectUrl(accessToken, map)
Catch ex As Exception
I thought to find the link with GetPublicObjectUrl,but I got an exception: One or more parameters are invalid.
What is wrong with my code or is there a solution? The For each works fine and
"BaseDirectoryEntry" works also fine to get ony the directories, not the files.
Your help is very much appreciated!