Pergunta

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.

Nenhuma solução correta

Outras dicas

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!

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top