cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do I work with Client.AccountInfo?

How do I work with Client.AccountInfo?

Andy
Super User alumni

I'm looking to check a user's email and verification status through Client.AccountInfo. I currently use a 3rd party JavaScript Core SDK, but it's syntactically the same as the Datastore JS API, at least the Common section of these docs. Anyway, I currently have a var client as a new Dropbox.Client() with the public key passed in, and a client.authenticate() to go with it. The docs are either worded weirdly, or I'm missing something, but like I said, this SDK is syntactically the same as the Common part of the linked Datastore API. client.AccountInfo.email didn't seem to work, so how would I go about doing this?

Did this post help you? If so, please mark it for some Kudos below.

Did this post fix your issue/answer your question? If so, please press the 'Accept as Solution' button to help others find it.

Did this post fail to resolve your issue? If so, please give us some more information so we can try and help - please remember, we cannot see over your shoulder, so be as descriptive as possible!

2 Replies 2

Steve M.
Dropbox Staff

Are you by chance using https://github.com/dropbox/dropbox-js? (In general, it would probably help if you told people what library you're actually using.)

Assuming you are, AccountInfo is a class. You'll need an instance of that class.

I think you're looking for code like this (completely untested):

client.getAccountInfo(function (err, accountInfo) {
    if (err) {
        console.log("ERROR: " + err);
    }
    else {
        console.log("Email: " + accountInfo.email);
}
});

Andy
Super User alumni

Yup, that's the library. Totally forgot to mention that in my post. Sorry about that.

I completely missed the .getAccountInfo() in either documentation. That seems to work perfectly!

Did this post help you? If so, please mark it for some Kudos below.

Did this post fix your issue/answer your question? If so, please press the 'Accept as Solution' button to help others find it.

Did this post fail to resolve your issue? If so, please give us some more information so we can try and help - please remember, we cannot see over your shoulder, so be as descriptive as possible!

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Andy Super User alumni
  • User avatar
    Steve M. Dropbox Staff
What do Dropbox user levels mean?