문제

I can't seem to find the equivalent in the BoxAPI.V2 .NET SDK to the following call:

curl https://api.box.com/2.0/folders/FOLDER_ID \ 
-H "Authorization: Bearer ACCESS_TOKEN" \  
-d '{"folder_upload_email": {"access": "open"}}' \  
-X PUT

The closest that I am able to come up with is the following call signature:

BoxManager.Update(Folder folder, IEnumerable<FolderField> fields, string etag)

What appears to be missing in this call is the authorization directive ("access":"open"). Any ideas? I know I can execute this REST query using other means as well -- but that would defeat the purpose of an SDK.

올바른 솔루션이 없습니다

다른 팁

Can you confirm which version of the .NET SDK you are using for the Box V2 API calls? The officially supported version is available at: https://github.com/box/box-windows-sdk-v2

To update the folder upload email access, you can use the following:

        BoxFolderRequest folderReq = new BoxFolderRequest()
        {
            Id = "YOUR_FOLDER_ID",
            FolderUploadEmail = new BoxEmailRequest() {  Acesss = "open" }
        };

        BoxFolder f = await _foldersManager.UpdateInformationAsync(folderReq);

Feel free to open issues on the github page should you come across any problems. Thanks!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top