App User not showing any files
We have an App User that takes files from one service and uploads it into box. The amount of files have gone unchecked and so we wanted to compress and remove duplicate files. We renamed the old folder it was dumping files to that we were collaborators on and then it remade the folder itself because it then didn't exist and started dumping files to it. We thought it would be rather simple to just grant ourselves access because of the admin console.
I have been using the JWT auth method and I believe I am interacting with the API as the service, however the API doesn't return anything as far as folders that user is the owner or even co-owner of. It returns invalid parameter for the folderId that I received from a user report where the service has remade the folder and has a new ID.
I am unsure how I am supposed to gain access to this repo of data. My first idea was to try to generate a collaborator/share link using the service account with the API and then grant my regular user access to the folder, but then we hit the folderID problem. Is this correct or is there an easier way to do this?
-
Hi ,
Let me see if I can provide some insight into how to access these folders as a start. I'll add some context / explanations along the way, but without actually seeing the code I'm going to make a few assumptions.
When you go through the JWT auth process, you are technically interacting with the service account for the app, which you can think of as an app user that represents your application. Without being collaborated in on the folders that you're trying to search for, that account will not be able to find the files / folders within another app user account.
To do that, you need to auth as the app user. In doing so, you are now making calls on behalf of that user, as opposed to through the service account. At that point you should be able to find / work with all files / folders in that app user account.
If you are trying to find folder IDs within the admin account, you can go to your admin account content section, click on the name of the app user in the list, then click through until you reach the folder that you're looking for an ID from. Once the folder is loaded the URL in your browser should look something like https://app.box.com/master/content/2095623952/6309375732/0. That last group of numbers, 6309375732 in this case, will be the folder ID.
Hope that helps. If not, if you can provide more context / code around where my assumptions above are wrong that should help us dig into the root of the problem.
Thanks,
Jon
Please sign in to leave a comment.
Comments
1 comment