zmoog / public-notes

Apache License 2.0
0 stars 1 forks source link

Figure out how to use family.axioscloud.it API #12

Open zmoog opened 1 year ago

zmoog commented 1 year ago

I am currently scraping the web site to get access to my kid's data, but it's not great. I would be great to access the API instead.

zmoog commented 1 year ago

Collecting some resources (mostly in Italian):

zmoog commented 1 year ago
$ cat login.json
{
    "JsonRequest": "{\"sCodiceFiscale\":\"91014810013\",\"sUserName\":\"1234\",\"sPassword\":\"hola-mundo\"}"
}

$ curl -i -d "@login.json" -H 'content-type: application/json' -X POST https://wspublic.axioscloud.it/webservice/AxiosPublicRest.svc/PublicLogin
HTTP/1.1 200 OK
Date: Sat, 25 Feb 2023 10:16:40 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 202
Connection: keep-alive
Cache-Control: private
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Access-Control-Allow-Credentials: false
Access-Control-Allow-Origin: *.axioscloud.it
Access-Control-Allow-Methods: GET, POST
CF-Cache-Status: DYNAMIC
Server: cloudflare
CF-RAY: 79efafd7384159ad-MXP

"{\"errorcode\":-1,\"errormessage\":\"ATTENZIONE! - Accesso non autorizzato dalla Scuola. La scuola non ha autorizzato l\\u0027accesso esterno ai dati. Non è possibile continuare.\",\"response\":null}"%                                                                
zmoog commented 1 year ago

Here's another endpoint: