FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
173 views 1 comments
by anonymous
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 anonymous

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 anonymous
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.