Trying to upload a file to Box using the Box API for .NET using the following code:
Dim reader As StreamReader = New StreamReader("box.credentials.json")
Dim json As String = reader.ReadToEnd()
Dim config As IBoxConfig = BoxConfig.CreateFromJsonString(json)
Dim sdk As BoxJWTAuth = New BoxJWTAuth(config)
Dim token As String = sdk.AdminToken()
Dim client As BoxClient = sdk.AdminClient(token)
Unfortunately, the line "Dim token As String = sdk.AdminToken()" is throwing a NullReferenceException.
I am using Visual Studio 2015, target .NET framework is 4.6. The API is served by Box.V2.dll version 1.0.0.0.
Can anyone help with this problem?
Thanks,
Ronny