invalid_grant when using Java SDK
Hi all - I'm working on my initial box integration using a service account setup for App+Enterprise access. I'm receiving an invalid_grant - Grant credentials are invalid in response to this block of code. My clientId is 9fxqtste70ak8rcrf726p90aepxira09.
BoxCCGAPIConnection boxApi = BoxCCGAPIConnection.applicationServiceAccountConnection(
clientId, secret, enterpriseId
);
BoxFolder folder = BoxFolder.getRootFolder(boxApi);
for (BoxItem.Info itemInfo : folder) {
if (itemInfo instanceof BoxFile.Info) {
BoxFile.Info fileInfo = (BoxFile.Info) itemInfo;
log.info("fileInfo = " + fileInfo.getName());
// Do something with the file.
} else if (itemInfo instanceof BoxFolder.Info) {
BoxFolder.Info folderInfo = (BoxFolder.Info) itemInfo;
log.info("folderInfo = " + folderInfo.getName());
// Do something with the folder.
}
}
-
Hello,
Did you happen to make any changes to the scopes/access level after authorizing? If so, you will need to reauthorize in the admin console.
Alex
投稿コメントは受け付けていません。
コメント
3件のコメント