dajomas Posted February 6, 2010 Report Share Posted February 6, 2010 This is a repost of a message I posted in the announcements thread for uTorrent 2.0.0 but it got swamped pretty quickly so I thought, it should get it's own thread in the Web API board. Just hope someone picks it up...I wrote some tools that make use of the WEBAPI (yes token authentication is being used) and under version 1.8.5, they work like a charm but in version 2.0.0, I do get a token but calls to for instance the getprops or list functions give me an error 300 back.Sadly, this means I have to revert back to version 1.8.5Has something changed in the API or is this a bug. The weirdest thing is that the webui works just fine....The problems I encounter happen with uTorrent 2.0.0 in combination with webui 0.362 and 0.370GreetinxJohan Link to comment Share on other sites More sharing options...
Firon Posted February 6, 2010 Report Share Posted February 6, 2010 Are you grabbing the token correctly? http://trac.utorrent.com/trac/wiki/TokenSystemIt also should occur directly after ?action, ?list, etc. Link to comment Share on other sites More sharing options...
dajomas Posted February 7, 2010 Author Report Share Posted February 7, 2010 * First thing I do is: http://<username>:<password>@<host>:<port>/gui/token.html* Next thing is to grab the contents of the tag with id "token" and store that as the token. So that would be anything between "<div id='token' style='display:none;'>" and "</div>"* Then I grab the full list with: http://<username>:<password>@<host>:<port>/gui/?list=1&token=<token>* Then I get the properties for each torrent with: http://<username>:<password>@<host>:<port>/gui/?action=getprops&hash=<torrent hash>&token=<token>* Finally I would set sertain properties with: http://<username>:<password>@<host>:<port>/gui/?action=setprops&hash=<hash>&s=<setting>&v=<value>&token=<token>In addition, I might also set the label or start/stop/forcestart a torrentAs I mentioned, this worked fine in 1.8.5 but in 2.0.0 any action (like list= or action=) will result in an error 300PS. Anything between < and > would be replaced by it's original content Link to comment Share on other sites More sharing options...
lavir Posted February 7, 2010 Report Share Posted February 7, 2010 Try this http://<username>:<password>@<host>:<port>/gui/?token=<token>&action=getprops&hash=<torrent hash> Link to comment Share on other sites More sharing options...
Ultima Posted February 7, 2010 Report Share Posted February 7, 2010 * Then I get the properties for each torrent with: http://<username>:<password>@<host>:<port>/gui/?action=getprops&hash=<torrent hash>&token=<token>Then you haven't read the documentation carefully enough.This token value:...* for painful reasons can occur no later than the position after the "action" or "list" parameter Link to comment Share on other sites More sharing options...
dajomas Posted February 8, 2010 Author Report Share Posted February 8, 2010 Oops... Reading documentation is an art I haven't fully masterred.....Update:Ultima: Thanx for the pointer! That fixed my issue. Now I can run 2.0! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.