Hi All
I am facing an issue only when using Box config file.
It is failing exactly on the line highlighted in below code snippet.
I am passing "xxxxxxxxxx2" as my parent folder Id. But in the exception message it seems to be appending "d_" before the parent folder Id.
Whereas, I can see no issue when using Developer Token for the same task.
Exception:
The API returned an error code: 404
{"type":"error","status":404,"code":"not_found","context_info":{"errors":[{"reason":"invalid_parameter","name":"folder","message":"Invalid value 'd_xxxxxxxxxx2'. 'folder' with value 'd_xxxxxxxxxx2' not found"}]},"help_url":"http:\/\/developers.box.com\/docs\/#errors","message":"Not Found","request_id":"ejhgfyugchbakus6"}
Code snippet:
Reader reader = new FileReader("src/main/resources/xxxxxxxx_xxxxx_config.json");
BoxConfig boxConfig = BoxConfig.readFrom(reader);
IAccessTokenCache accessTokenCache = new InMemoryLRUAccessTokenCache(100);
BoxDeveloperEditionAPIConnection bac = BoxDeveloperEditionAPIConnection.getAppEnterpriseConnection(boxConfig, accessTokenCache);
BoxFolder bfolder = new BoxFolder(bac, "xxxxxxxxxx2");
for (BoxItem.Info itemInfo : bfolder) {
if (itemInfo instanceof BoxFolder.Info) {
BoxFolder.Info folderInfo = (BoxFolder.Info) itemInfo;
if(folderInfo.getName().toString().compareTo("Folder1")==0)
{
info = folderInfo;
}
}
}
