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?
Yes. Ubuntu One provides an OAuth-secured Web API for account details; the OAth credentials of the local user are accessible via the freedesktop.org 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
Wield your API powers responsibly.