OpenWrt Forum Archive

Topic: JsonRpc login : what is the correct URL to use for login

The content of this topic has been archived on 20 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I was previously working on the UI for the Deutsche Telekom OpenWrt based Open Router project. I am now trying to get the UI I built to work on standard OpenWrt. I am currently testing on Attitude Adjustment 12.09 x86 in a VirtualBox VM. 

On the Deutsche Telekom routers the RPC login used the following:
URL: /cgi-bin/luci/rpc/auth
Post Data : {"method":"login","params":["root","password"]}

I have found documentation to support this here:
http://luci.subsignal.org/trac/wiki/Doc … onRpcHowTo

On my current test system I get the following error:
No page is registered at '/rpc/auth'.
If this url belongs to an extension, make sure it is properly installed.
If the extension was recently installed, try removing the /tmp/luci-indexcache file.

I checked the standard login on my test system and it uses the following:
URL: /cgi-bin/luci
Post Data: username=root&password=password

So I'm wondering what's going on? Has the rpc login procedure changed? Am I looking at wrong/outdated documentation?

Solved.

luci-lib-lucid-rpc & luci-mod-rpc needed to be installed.

opkg update
opkg install luci-mod-rpc
opkg install luci-lib-lucid-rpc
reboot

The discussion might have continued from here.