Hi
I want to create a directory from a C# program in Dropbox. When I run this from my desktop PC everything works perfectly. As soon as I run the program from my laptop I get the error message:
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 the app console I set the file permissions to Files-Metadata and Filed-Content to Write. The Permssion Type is Scoped App.
I create a directory with the following code:
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 cannot create " + folderPath;
}
}
I hope you can help me how to work around this error.
Best regards
Peter