Not able to upload file using dot net sdk

新規投稿

コメント

3件のコメント

  • laura

    Hi Kiran,

     

    Thanks for posting and for the details you've provided. It looks like you're working with two different authentication methods, one for use with Box Platform (App Auth) and the other for use with the Box Content API (OAuth). Configuration instructions for the two authentication methods are included in the .NET SDK read-me documentation.

    OAuth is used with standard Box accounts, i.e. those created and managed on app.box.com. Since your client has an enterprise account with Box, enterprise users who want to use the app you're building will need to authenticate with OAuth (the commented-out lines in your code). App Auth with Box Platform is intended to be used with App Users, users that can only be accessed by the Box API through your application. 

    Please let me know if this helps!

    0
    コメントアクション Permalink
  • andrewmsteiger

    I am hoping to get clarity on this.

     

    I also have a client with an Enterprise box account.  We are building a server application to upload files to this account and we are unclear how to authenticate with the API via the SDK.  This application will be unmanned.

     

    We believe we should be using the following (from the SDK documentation on GitHub):

     

    Using with Box Platform Developer or Box Platform Enterprise Configure

    var boxConfig = new BoxConfig(, , , , , );
    var boxJWT = new BoxJWTAuth(boxConfig);


    Can you confirm The above is the way we should be attempting to authenticate and where to find the configuration values in the admin console (specifically the enterprise id and JWT information)?

     

    Thanks.

    0
    コメントアクション Permalink
  • clewisjwenergy

    I get this is a year to late, but you can get this information from the developer console. I however had a really tough time understanding what the passphrase was and why the RSA key generated by Box.com wasn't good enough. Luckily, box.com supplies the JSON of all you'd want. You would just do this:

     

    using (FileStream fs = new FileStream(@"HeyThisIsMy.json", FileMode.Open))
                {
                    boxConfig = BoxConfig.CreateFromJsonFile(fs);
                }        

     

    Obviously replace the json name, and you're good to go.

    0
    コメントアクション Permalink

サインインしてコメントを残してください。