FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

13244 questions

15731 answers

25395 comments

49875 members

0 votes
90 views 1 comments
by
Hi,

I am using a RUT240 with FW ver.: RUT2XX_R_00.01.13.3

I send the following POST request, but I always get >> {"jsonrpc":"2.0","id":1,"result":[6]} << as response.

{
    "jsonrpc":"2.0", "id":1, "method":"call", "params":
    [
        "00000000000000000000000000000000", "session", "login",
        {
            "username":"myUsername", "password":"myPw"
        }
    ]
}

I tried sending the POST request via the recommended Browser Addon and via a Python script but I always get the same stated response.

I can connect to the router via the browser by navigation to 192.168.1.1 and logging in with the same username and pw combination as I use in the request.

Thanks

1 Answer

0 votes
by

Hello,

I have tested your setup, and I assume where your error might be. 

I don't know if you have tried this, but instead of whatever “myUsername“ you have entered, try to use “root“, and router's login password.

You can read more about JSON RPC in the following link: https://wiki.teltonika-networks.com/view/RUT955_Monitoring_via_JSON-RPC_windows

Best regards,  

Best answer
by
Thank you for your swift help.

Using "root" as the username worked. I tried this option before with my python script but it turned out that the auto formater introduced 2 unwanted commata into my access token request. Anyway now everything works as expected.