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

I'm working on a web app that includes a file export to Dropbox and Skydrive and i wanted to add UbuntuOne, too. That means i need access to files and if i understand the U1 API docs correctly the only oauth token with access to files is full access token:

But requesting a full access token requires the user to type in his username and password into my app, is that correct? Or is there another way to get a request a token with access to the user's files the same way a limited access token is requested, i.e. the user doesn't have to provide his username and password to my app?

share|improve this question
up vote 3 down vote accepted

There is. As a web app, you may use the standard OAuth dance against Ubuntu One to obtain an OAuth token.

Use URLs to get a token, redirect the user to to have it authorized, and to convert it to a real token which you can save and use to authenticate requests on the user's behalf.

share|improve this answer
also, I'm happy to provide additional information and help if required; just drop me a line or chase me down on freenode IRC (as aquarius). – sil Mar 14 '12 at 10:50
Thanks! This looks much like requesting a limited access token but without the app subfolder. Is this documented somewhere? If i try this with PHP OAuth it throws an exception, saying that most likely my consumerToken/Secret are incorrect. Do i have to use u1app, as in the limited access tokens or do i have to request unique tokens? If so, where can i get a consumerToken/Secret? – migerh Mar 14 '12 at 13:41
To clarify, for these tokens, use ubuntuone/hammertime as the consumer details. – sil Mar 15 '12 at 22:11
@sil your first link ( returns 404 – Lucio Mar 15 '14 at 23:11

This should work:

There's some example code in a library I wrote that goes through these steps:

share|improve this answer
This looks like it's using the Ubuntu SSO where my app needs the user's username and password which is what i'm trying to avoid. – migerh Mar 14 '12 at 13:45
No, this is how you get an access token the first time. Once you have the access token you can use it by signing the requests with the consumer/token pair as shown in the example. – webm0nk3y Mar 14 '12 at 19:49

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.