Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For what I promise are un-nefarious reasons, I'd like to programmatically fetch the Ubuntu One account details for the current user of an application (eg name, email, free space). Is there way to achieve this?

share|improve this question
up vote 2 down vote accepted

Yes. Ubuntu One provides an OAuth-secured Web API for account details; the OAth credentials of the local user are accessible via the secrets keyring service. Of course, you can't read these credentials willy-nilly, as the user needs to password-unlock them.

Fortunately, you do not need to navigate the maze of technologies on your own (as I did), but can instead can use a handy tool Ubuntu One provides:


If the current user doesn't have a U1 account, this will raise a CredentialsNotFound error. Otherwise it will return a server response in the form of a JSON string. Check the 'status' value to make sure the authentication went through ('200' indicates success). On success, the JSON will have the values:

username, openid, last_name, features, couchdb_root, nickname, id, subscription, first_name, couchdb, total_storage, current_plan, email, detailed_plans

Wield your API powers responsibly.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.