Hi, I have created a "Custom APP" with "Server Authentication (Client Credentials Grant)". While using the SDK, I'm passing my client ID, client secret, and user id. Here is the code.
BoxCCGAPIConnection api = BoxCCGAPIConnection.userConnection(
"1z7s4rcl4gpjudynikjvrupgj9fmttgp",
"Client Secret",
"User ID"
);
BoxFolder rootFolder = BoxFolder.getRootFolder(api);
for (BoxItem.Info itemInfo : rootFolder) {
System.out.format("%s\n", itemInfo.getName());
Getting the following error while executing the code.
Exception in thread "main" com.box.sdk.BoxAPIResponseException: The API returned an error code [400] invalid_grant - Grant credentials are invalid