Hi there, I need some help to migrate to the short lived token.
Normally I check if I have the token, then call or execute the other doprobx APIs (e.g. file upload):
Auth.startOAuth2Authentication(getActivity(), db_k);
While now I call:
Auth.startOAuth2PKCE(context, db_k, DbxRequestConfig.newBuilder("app")
.withHttpRequestor(new OkHttp3Requestor(OkHttp3Requestor.defaultOkHttpClient()))
.build(), Collections.singleton("files.content.write"));
Which gives me a token, that then I store, and re-use the following time and also for the actual operation:
DropboxClientFactory.init(accessToken);
PicassoClient.init(context, DropboxClientFactory.getClient());
DbxClientV2 mDbxClient = DropboxClientFactory.getClient();
mDbxClient.files().uploadBuilder("/"+recordingToExport.getName()+"_Features.csv")
.withMode(WriteMode.OVERWRITE)
.uploadAndFinish(inputStream);
How does this code change when using short lived access tokens?
Your documentation on github doesn't seem to use any of this, but obviously at the next call I get an error because the token expired.
Please help