You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm creating an application where I need to save the token to a file and restore it at a later time. after creating the getting the token:
String token = api.save();
I save the token to a file where I expect to be able to restore at later time (greater than 1h):
api2.restore(token);
During the first hour, everything seems fine. Afterwards, I get the following exception:
Exception in thread "main" com.box.sdk.BoxAPIException: The API returned an error code: 400
at com.box.sdk.BoxAPIResponse.<init>(BoxAPIResponse.java:70)
at com.box.sdk.BoxJSONResponse.<init>(BoxJSONResponse.java:30)
at com.box.sdk.BoxAPIRequest.trySend(BoxAPIRequest.java:423)
at com.box.sdk.BoxAPIRequest.send(BoxAPIRequest.java:209)
at com.box.sdk.BoxAPIRequest.send(BoxAPIRequest.java:184)
at com.box.sdk.BoxAPIConnection.refresh(BoxAPIConnection.java:464)
at test.App.main(App.java:38)
when I try, to use the connection to make a request:
BoxFolder folder = new BoxFolder(api, parentFolderId);
for (BoxItem.Info itemInfo : folder) {
if (itemInfo instanceof BoxFolder.Info) {
BoxFolder.Info folderInfo = (BoxFolder.Info) itemInfo;
resultFolders.add(new BoxPluginFolder(folderInfo.getName(), folderInfo.getID()));
}
}
I'm not sure what I'm expected to do. I'm not be able to refresh it aftwards.
The text was updated successfully, but these errors were encountered:
cheyrico2
changed the title
Is the developer expected to periodically refresh their token event?
Is the application expected to set AutoRefresh to false if they plan to save the connection?
Apr 11, 2016
cheyrico2
changed the title
Is the application expected to set AutoRefresh to false if they plan to save the connection?
Is the application expected to set AutoRefresh to false if they plan to save the connection and restore it after an hour has passed?
Apr 11, 2016
I'm creating an application where I need to save the token to a file and restore it at a later time. after creating the getting the token:
String token = api.save();
I save the token to a file where I expect to be able to restore at later time (greater than 1h):
api2.restore(token);
During the first hour, everything seems fine. Afterwards, I get the following exception:
when I try, to use the connection to make a request:
I'm not sure what I'm expected to do. I'm not be able to refresh it aftwards.
The text was updated successfully, but these errors were encountered: