Skip to main content
Question

Issues related to API execution users being able to access folders with the same name

  • December 5, 2025
  • 0 replies
  • 6 views

Our in-house service implements a Python SDK for creating folders and uploading files to BOX. User inputs consist of the target BOX folder path and the file to be uploaded. We execute the Python SDK using the "API execution account" provided by the user and upload the file to BOX. The processing logic works as follows: when the input folder path is "/Test/User", we first check if a "Test" folder exists at the root of the "API execution account". We then verify if a "User" folder exists directly under "Test", and if it does, we upload the file to that "User" folder. If "User" does not exist, we create it directly under "Test" and then upload the file. For example, if both "Account1" and "Account2" create folders named "Test" and grant collaboration access to the "API execution account", the root of the "API execution account" will display two "Test" folders. In this scenario, when the input folder path is "/Test/User", the "API execution account" cannot determine which "Test" folder to operate on. We anticipate multiple combinations of input folder paths and files. Therefore, since we expect users would find it difficult to manually identify folder IDs one by one from browsers, we require folder paths as input. We want to implement the functionality while maintaining the original input format of folder path and file.

Given this requirement, how should we implement the functionality that constructs folder and file paths by traversing the input folder path?
Alternatively, are there any necessary Box settings that need to be configured to achieve this functionality?