Search code examples
phpboxboxapiv2

Folder ID when creating folder using Box API


I'm using the BoxPHPAPI and I was wondering if there was a way to get the folder ID when creating a folder?

https://github.com/golchha21/BoxPHPAPI


Solution

  • The create_folder function returns the results of the Box folder creation call, which includes the id parameter. https://developers.box.com/docs/#folders-create-a-new-folder

    $folder = $box->create_folder('FOLDER NAME', 'PARENT FOLDER ID');
    print $folder->id;