You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
trithanhnguyen
3 years agoHelpful | Level 6
"users/get_current_account": Invalid select user id format error.
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.
Your suggestion to check the teamMemberId is very helpful. I did make some change after I ported the code that messed up the ID.
Thank you.
- trithanhnguyenHelpful | Level 6
This is a full error messages:
com.dropbox.core.BadRequestException: Error in call to API function "users/get_current_account": Invalid select user id format
at com.dropbox.core.DbxRequestUtil.unexpectedStatus(DbxRequestUtil.java:337)
at com.dropbox.core.v2.DbxRawClientV2$1.execute(DbxRawClientV2.java:154)
at com.dropbox.core.v2.DbxRawClientV2.executeRetriable(DbxRawClientV2.java:330)
at com.dropbox.core.v2.DbxRawClientV2.executeRetriableWithRefresh(DbxRawClientV2.java:351)
at com.dropbox.core.v2.DbxRawClientV2.rpcStyle(DbxRawClientV2.java:137) - ЗдравкоLegendary | Level 20
trithanhnguyen, Are you sure your 'teamMemberId' parameter carries correct value? Print it out and check the place where/how you get it from and is on that place something 'strange'. 😉
- trithanhnguyenHelpful | Level 6
I did print the teamMemberId to the log in the Centos server and checked it. It is correct string ID (I compare it with the one from the Windows 11 program).
- ЗдравкоLegendary | Level 20
Better perform this call on 'dbxTeamClient' context. So you wouldn't need 'broken; parameter (it's meaningless actually). 😉
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,882 PostsLatest Activity: 3 years agoIf you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!