Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

Adi4's avatar
Adi4
Explorer | Level 3
2 years ago

Error Method is not implemented

Hi !
I write a code that generate Access Token. It is in JSON format but I extract only Access token  and that Access token I used to make Client and call Method.
Here I get access token by using this method 

accessToken1 = getAccess(); // Here I got Access Token,  getAccess() give only access token in string formate
System.out.println(accessToken1) // It print Access Token

Now I make a client 

DbxRequestConfig config = DbxRequestConfig.newBuilder("dropbox/java-tutorial").build();
DbxClientV2 dbxClientV2 = new DbxClientV2(config, accessToken1);

and call method and print

try {
System.out.println("running");
System.out.println(dbxClientV2.users().getCurrentAccount());
} catch (UnsupportedOperationException uoe) {
System.err.println("getCurrentAccount method not implemented: " + uoe.getMessage());
// Handle or log the exception as needed
} catch (DbxApiException e) {
throw new RuntimeException(e);
} catch (DbxException e) {
throw new RuntimeException(e);
}

I got the output:


sl.Br4aZv3A4hhBNSSTZfPXQ6OrqJiqcbpQWW0FA3h1THML4DI0jT564fKrl7wvybXXt2sPYDs-C_N9dZoGotrvHCr3m7HZNEYQ86M_pgTUNem5-YN888QkTqLNgarWSDEnijjSb8-Qz6FA2LNHOQU8g5U
running
getCurrentAccount method not implemented: Method not implemented.

Means Access token print and then client generated enter to execute try block "running" (For debugging) is printed but when try to execute method then through error:   getCurrentAccount method not implemented: Method not implemented.

How I resolve this problem. I try to change dependencies but it not working.

1 Reply

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    2 years ago

    Is this the exact code you're running? I just tried this code myself and it worked successfully for me. When I plugged in an access token, it printed out the account information and did not throw that error.

     

    The getCurrentAccount method is implemented here.

About Discuss Dropbox Developer & API

Node avatar for Discuss Dropbox Developer & API
Make connections with other developers

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If 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, Facebook or Instagram.

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!