sectoralarm icon indicating copy to clipboard operation
sectoralarm copied to clipboard

Api url not working

Open sander-visser opened this issue 1 year ago • 6 comments

Where to get siteid when linked https://mypagesapi.sectoralarm.net/ is not functioning?

sander-visser avatar Mar 09 '24 06:03 sander-visser

that root wont work and looks that /User/Login is not valid anymore. Service use https://login.sectoralarm.com for login but library wont support it.

burner- avatar Mar 23 '24 21:03 burner-

I haven't been super active on this project as I don't use it due to sector alarms failing cloud services. But, I see they have reworked the login which might be more to work on than just changing URL.

Did anyone try to just change URL?

perbrage avatar Mar 24 '24 08:03 perbrage

I did not. But I look with browser and it looks that it still use https://mypagesapi.sectoralarm.net/ for commands but https://login.sectoralarm.com/ for login. By my understanding form sends its data to https://login.sectoralarm.com/u/login and it redirects to https://login.sectoralarm.com/authorize/resume and its redirect to country spesific url https://omatsivut.sectoralarm.fi/ each request include "state" property what is some kind session hash or something. from omatsivut it request oauth token from https://login.sectoralarm.com/oauth/token and that it will use https://mypagesapi.sectoralarm.net/

And looks that there is no https://login.sectoralarm.com/User/Login so direct url change wont help.

burner- avatar Mar 24 '24 16:03 burner-

as additional info. Looks that entrypoint needs to be https://omatsivut.sectoralarm.fi/login and it make some kind token what is needed to go next steps. Not sure is there some way to bypass all that Firebase crap. Most probably that mobile app get auth token from some other place.

burner- avatar Mar 24 '24 16:03 burner-

I got the API working fine from curl/python:

https://github.com/sander-visser/py-playground/blob/main/sector_alarm_status.py

sander-visser avatar Sep 25 '24 20:09 sander-visser

See https://github.com/perbrage/sectoralarm/issues/43#issuecomment-2493352739

perbrage avatar Nov 22 '24 12:11 perbrage