Box.V2.JWTAuth.BoxJWTAuth.GetToken throws NullReferenceException (.NET)

回答済み
新規投稿

コメント

2件のコメント

  • jcleblanc

    Hi ,

     

    Off hand I don't see anything anything directly wrong with the code, as this is what I'm using for my C# code:

     

    // Configure Box SDK instance
    var reader = new StreamReader("config.json");
    var json = reader.ReadToEnd();
    var config = BoxConfig.CreateFromJsonString(json);
    var sdk = new BoxJWTAuth(config);
    var token = sdk.AdminToken();
    BoxClient client = sdk.AdminClient(token);

     

    The one thing that I can say is it might be worth making sure that the content of your .json file is correct (should be directly downloaded from the Box app and not modified in any way) and that it's actually being read in correctly.

    0
    コメントアクション パーマリンク
  • ronnysh

    Thanks, I figured it out - the app needed to be submitted for authorization.

    0
    コメントアクション パーマリンク

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