indykoning / PyPi_GrowattServer

MIT License
70 stars 32 forks source link

Is the userId always the same? #83

Open simonf2004 opened 1 week ago

simonf2004 commented 1 week ago

Hello, i have started using this library and i am getting the 403 error about 40% of time i try to login (even though i have changed the user agent). I think one possible solution to this might be to login just once, keep the userId (that the login returns) and just get the data with this userid. My question is: Is userId always the same or does it change from time to time. If it was always the same i could just login once and then always use the obtained userid no?

Thank you very much and have a great day

indykoning commented 1 day ago

I'm pretty sure the userId is indeed always the same, however i do not believe the userId is authentication. Rather i'm guessing a cookie or session is started and thus you need to log in before anything else.

You could try it though, by logging in using one script. Then starting another script to get the plant list using that userId

simonf2004 commented 21 hours ago

Yes, you are right. The Userid seems to be always the same and it isnt authenticiation. It wouldnt really make sense. Thanks for your reply