Welcome to the new Box Support website. Check out all the details here on what’s changed.

Post Request Works but Get Request doesn't

Answered
New post

Comments

3 comments

  • Official comment
    Alex Novotny

    Hello, 

    Try changing Method.Get to Method.GET

    Thanks,

    Alex, Box Developer Advocate

    Comment actions Permalink
  • Tyler Meneghini

    ended up giving up on the HTTP Request and used the SDK. Here is my code that works:

    BoxFolder folderWithLink = new BoxFolder(); BoxSharedLinkRequest linkRequest = new BoxSharedLinkRequest();

            int offset = 0;
            int count = 0;
            string folderID = "";
    
            //create connection to Box.com
            var boxConfig = new BoxConfigBuilder("CLIENT ID", "CLIENT SECRET", "Enterprise ID", "PRIVATE KEY", "PRIVATE KEY PASSWORD", "PUBLIC KEY ID").Build();
            var boxJWT = new BoxJWTAuth(boxConfig);
            var adminToken = await boxJWT.AdminTokenAsync();
            var client = boxJWT.AdminClient(adminToken);
    
    
            //Get the parent folder information and find the Batch folderID
            while (folderID == "")
            {
                var batches = await client.FoldersManager.GetFolderItemsAsync("FOLDER ID", 250, offset);
                foreach (var batchEntry in batches.Entries)
                {
                    Console.Writeline(Batch.Name);
                }
    0
    Comment actions Permalink
  • Alex Novotny

    Ah! Yes. I was actually wondering why you weren't using the SDK... :) 

    0
    Comment actions Permalink

Post is closed for comments.