I keep reading that I am responsible for retrieving and saving a Refresh Token. And then I read in some posts that the SDK handles that behind the scenes. So, I'm confused.
Here's what I'm using to test uploading files:
public BoxClient CreateAccessClient(string tokenFilePath)
{
BoxClient result = null;
// Open a stream to read and dispose of the automatically created Box configuration file.
using (FileStream fs = new FileStream(tokenFilePath, FileMode.Open, FileAccess.Read))
{
// Initialize the SDK with the Box configuration file and create a client that uses the Service Account.
var session = new BoxJWTAuth(BoxConfig.CreateFromJsonFile(fs));
result = session.AdminClient(session.AdminToken());
}
return result;
}I'm using the JSON file I downloaded when I created my App. I understand I'm using my App's Service Account (on a Developer's account) for access and this appears to be working OK for uploading and getting shared links. But, I'm not seeing a Refresh Token. In looking at the debug information for the client I create above, I see a RefreshToken variable in BoxClient.Auth.Session.RefreshToken, but it's null. And I do see my access token has a lifetime of 60 minutes.
Do I assume correctly that in 60 days from the time I created my App account, I won't be able to connect anymore? If so, what do I need to change. Thanks!