I have a test program and it works fine in Windows 11. When I ported the code into Centos 7 and ran it, it returned an error:
com.dropbox.core.BadRequestException: Error in call to API function "users/get_current_account": Invalid select user id format
I am using Java 8 and Dropbox SDK version 4.0.1. This is portion of the code that causes the problem:
static List<EventLog> getFilesFromMember(List<EventLog> fileLog,
String teamMemberId,
String teamMemberEmail,
String ownerName) throws DbxException
{
DbxClientV2 dbxClient = dbxTeamClient.asMember(teamMemberId);
FullAccount acc = dbxClient.users().getCurrentAccount(); //Work fine in Windows 11 but fails in Centos 7 server.
String rootNs = acc.getRootInfo().getRootNamespaceId();
dbxClient = dbxClient.withPathRoot(PathRoot.namespaceId(rootNs));
ListFolderResult fileRes = dbxClient.files().listFolderBuilder("").withRecursive(true).start();
Any suggestion to fix it?
Thank you.