Hello,
today i tried to use Box SDK for .NET C#, Box.V2.Core, but i have problem with getting any response from API. Everytime i tried to run or debug program, i get exception Box.V2.Exceptions.BoxSessionInvalidatedException. What cause this exception and how can i fix this? Folder ID is custom, i'm jus ttrying to authenticate and get a response in any way to see if it works. Later i need to make a program to get folders and get collaborators for each folder in box.
Code is below (of course client id, secret and developer token is replaced by strings):
static async System.Threading.Tasks.Task Main(string[] args)
{
var config = new BoxConfig("clientid", "clientsecret", new Uri("https://app.box.com"));
var session = new OAuthSession("developertoken", "N/A", 3600, "bearer");
var client = new BoxClient(config, session);
string folderId = "11111";
BoxCollection collaborations = await client.FoldersManager.GetCollaborationsAsync(folderId);
}
Thank you for help.