Hi
Ich möchte aus einem c# Programm in Dropbox ein Verzeichnis erstellen. Wenn ich das von meinem Desktop-PC ausführe, funktioniert alles perfekt. Sobald ich das gleich Programm von meinem Laptop ausführe erhalte ich die Fehlermeldung:
Dropbox.Api.BadInputException: "Error in call to API function "files/create_folder_v2": Your app is not permitted to access this endpoint because it does not have the required scope 'files.content.write'. The owner of the app can enable the scope for the app using the Permissions tab on the App Console."
In der App-Console habe ich die File-Permissions auf Files-Metadata und Filed-Content auf Write gestellt. Der Permssion-Type ist Scoped-App.
Mit folgenden Code erstelle ich ein Verzeichnis:
using (var dbx = new DropboxClient(accessToken))
{
string folderPath = destinationPath.Replace("\\", "/").ToLower();
if (folderPath.EndsWith("/"))
folderPath = folderPath.Substring(0, folderPath.Length - 1);
try
{
var fldMetadata = await dbx.Files.CreateFolderV2Async(folderPath);
if (fldMetadata.Metadata.IsFolder)
retCode = fldMetadata.Metadata.Name;
else
retCode = "ERROR" + folderPath + " konnte in Dropbox nicht erstellt werden.";
}
}
Wie bekomme ich das Problem in den Griff? Vielen Dank für jede Hilfe 😍