Page 1 of 1

Building a Deluge client for Android devices

Posted: Tue May 12, 2009 5:38 pm
by ElmoTheElk
Hi,

I am working on an Android client for various torrent apps (daemons) called Transdroid. (http://transdroid.wordpress.com) Several Deluge users have asked if I could build support for their favourite torrent app as well, and I am happy to. Since it seems that it uses an JSON-based RPC API - and I have already build support the exact same way for Transmission - it shouldn't be too hard.

However, the documentation on http://dev.deluge-torrent.org/wiki/Deve ... WebUi/Json is pretty scarse. Now, looking at some Deluge sources and searching the web I though I would be able to get it working, but I'm already stuck on point A: authentication. Basically, I can nowhere find how authentication to the Deluge web UI is done. In some source file I have found the actual error message "JSON-error:not authenticated", but this didn't really help me out... (for one because Python is about the only language I have never programmed in ;-) ).

Could anyone help me out? A small example: I send the JSON string request to http://server:8112/json/rpc using a POST stream:
{"method":"get_torrents_status"}
The results I get is:
{"version": "1.1", "id": 0, "error": {"message": "not authenticated", "number": 123, "error": "not authenticated"}}

I use Deluge 1.1.7 myself (from the Launchpad Deluge-team PPA) on Ubuntu Jaunty 9.04. The web client itself works fine.