Skip to main content
Question

Not able to view uploaded files in Box dev console

  • May 22, 2025
  • 1 reply
  • 22 views

Forum|alt.badge.img

Hi team,
1.I had created Custom Box Application(App access level=App+ with Enterprise).
2.I generated public-private key pair in Box dev console.
I had created Box POC to upload xls file to Box using BoxAPI reading key credentials from #2 above.
And it succesfully created it.
3.However,when we did the folloeing:
3.1 Used BoxDeveloperEditionAPIConnection api = BoxDeveloperEditionAPIConnection.getAppEnterpriseConnection(userID,
                    clientID, clientSecret, encryptionPref, accessTokenCache);
                    And called using below snippet,programmatically,in debug mode,file was uploaded.:
            BoxFolder rootFolder = BoxFolder.getRootFolder(api);
            log.info("BoxUpload action=FileUpload status=RootfolderReceieved Rootfolder={}", rootFolder);
            InputStream fin = new FileInputStream(filePath);
            String fileId = uploadFile(fileName, fin, api, rootFolder);

    BoxFile.Info boxInfo = folder.uploadFile(stream, fileName);
                fileId = boxInfo.getID();
                stream.close();                    
                However,When we logged into Box developer console and looked in Admin console/Content section,under boxforrejectorders
                section,There were no files.
                Can you provide any leads to resolve this issue.

As we are nearing UAT,early response will be appreciated.

Box id used:nikerejectreport@gmail.com
Thanks

Justin
BOX1_CMFw9U8BX3X_I_PGvpNOPg.png

1 reply

Forum|alt.badge.img

Hi Nick

I assume 'boxforrejectorders' is the name of your app and also service account for the app. However your this part of your code suggests you are connecting as a user with a specific user ID. The file you have uploaded should be under that user's root folder. You can always check in code with BoxUser.getCurrentUser(api) - see https://github.com/box/box-java-sdk/blob/main/doc/users.md#get-the-current-users-information

BoxDeveloperEditionAPIConnection api = BoxDeveloperEditionAPIConnection.getAppEnterpriseConnection(userID,
                    clientID, clientSecret, encryptionPref, accessTokenCache); 

Best regards,
Peter Christensen, Platform Solutions Engineer, Box