Good Morning everyone,
I have a question about my java web app and automatic refresh token generation:
I have my access token and appName stored in application.properties file.
After that, I have a configuration class that contains getter and setter of my properties.
Finally I hava a customized java class with different dropbox methods like login, update file, delete file, etc.
After 30th September I can't have a long life access token, but I need to generate x times a refresh token and I don't know how to get it automatically and my question is:
Is there a method for generating the refresh token automatically?
right away some code examples:
APPLICATION.PROPERTIES:
application.dropbox.api.appName= myAppName
application.dropbox.api.accessToken= xxxxx
CONFIGURATION.JAVA:
@Value("${application.dropbox.api.appName}")
private String dropboxAppName;
@Value("${application.dropbox.api.accessToken}")
private String dropboxAccessToken;
DROPBOXUTILS.JAVA:
public static DbxClientV2 getV2Client(SuiteConfiguration suiteConfiguration) {
DbxRequestConfig config = DbxRequestConfig.newBuilder("").withAutoRetryEnabled().withUserLocaleFromPreferences().build();
DbxClientV2 client = new DbxClientV2(config, suiteConfiguration.getDropboxAccessToken());
return client;
}