Closed trentwiles closed 3 years ago
hmm... It might be. If you can find your district login page through this link then you should be good to go. If not, let me know and I'll see what I can do.
The API works like this:
So, let me know if you can find your district with the search tool above, if not I can update the API so you can skip step #1 and just specify your I.C URL directly.
look forward to hearing from you
I explained how it works much better in #7
I actually tried it out and it works fine. I'm not sure about how exactly setting up a IC instance works, but I believe they are all linked into a central database and when a user picks their district on the main site, they are forwarded to the correct instance (like you said).
Very interesting and useful project, only thing I could recommend is to add an option for a more "realistic" user agent in case IC starts blocking/flagging services like this in the future (ie. Mozilla/5.0 (X11; CrOS x86_64 13729.56.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.95 Safari/537.36
)
Glad everything worked out!
Interesting point about the user agent string. I was conflicted about this when I wrote it. Since it's a completely unofficial API running on servers that aren't mine I wanted to err on the side of caution and identify the API with a GitHub link and version number. That way I.C. sysadmins could contact me or easily temporarily block the API if there were any issues. I'm not sure about recent versions of I.C, but they used to have an access log that showed a log of the user agents that logged in. So I thought it'd be nice to be transparent about who/what was logging in as well. However, like you said, it does also mean they could flag these requests and block all of them if they dont like the idea of people using their public API in an unauthorized way. However, if that ever happens I can always update the user agent string to cycle thru some more realistic strings. Haven't had any issues so far, though.
Thanks for the response, I'll be sure to build something neat with this.
Good luck! Let me know what you build :)
My district uses a self hosted instance of Infinite Campus, is this project compatible with that?