Box API Object reference not set to an instance of an object. When AdminToken()
xubair81 opened this issue · comments
`try
{
using (FileStream fs = new FileStream(@"C:\Cube\Document\BoxSetup\BoxSetting.json", FileMode.Open))
{
boxJWT = new BoxJWTAuth(BoxConfig.CreateFromJsonFile(fs));
var adminToken = boxJWT.AdminToken();//**here i am getting null reference exception**
var adminClient = boxJWT.AdminClient(adminToken);
adminClientGlobal = adminClient;
BoxManager = new BoxManager(adminToken);
return true;
}
}
catch (Exception ex)
{
SendEmail(ex.Message);
throw ex;
}
`
Note: same json file work with other application without issue so ther is no access issue
Thanks for submitting this Issue. Unfortunately, it is missing the required checkbox fields that were provided in the template when you initially created the Issue:
- I have checked that the SDK documentation doesn't solve my issue.
- I have checked that the API documentation doesn't solve my issue.
- I have searched the Box Developer Forums and my issue isn't already reported (or if it has been reported, I have attached a link to it, for reference).
- I have searched Issues in this repo and my issue isn't already reported.
Please perform each step above to research your Issue before submitting it to our team. If you are still unable to resolve it, please re-create this Issue and check off those boxes when you submit it! Thanks for helping to streamline our process!