Dear GL.iNet Support Team,
We are working with a GL.iNet router running firmware version 4.5.17 and attempting to connect to it through our mobile application, which is intended for IoT device communication.
We are currently using the following API calls for authentication:
- Challenge Request
bash curl -X POST http://192.168.8.1/rpc -d '{"jsonrpc":"2.0","id":1,"method":"challenge","params":{"username":"root"}}'
- Login Request
bash
curl 'http://192.168.8.1/rpc' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Accept-Language: en-US,en;q=0.9' \
-H 'Connection: keep-alive' \
-H 'Content-Type: application/json' \
-H 'Origin: http://192.168.8.1' \
-H 'Referer: http://192.168.8.1/' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36' \
--data-raw '{"jsonrpc":"2.0","id":2,"method":"login","params":{"username":"root","hash":"0f14baf69fa5420c7ed0e7d0643c9cb5"}}' \
--insecure
Despite using these endpoints, we are receiving the following error:
{"id":2,"jsonrpc":"2.0","error":{"message":"Access denied","code":-32000}}
We have reviewed the documentation provided at: GL.iNet HTTP RESTful API Documentation, but unfortunately, it hasn’t resolved the issue.
Could you please provide any updated documentation, guidance, or examples on how to successfully authenticate using these APIs?
Thank you very much for your assistance, and we look forward to your response.
best,
Fahad Baig
Technical Lead Manager