BaQs / pyEzviz

Python package for ezviz cameras
Apache License 2.0
105 stars 45 forks source link

Incorrect captcha code #39

Closed hynek5 closed 3 years ago

hynek5 commented 3 years ago

PS C:\Users\Lenovo> pyezviz.exe -u user -p pass --debug devices switch
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): euauth.ezvizlife.com:443
send: b'POST /doLogin HTTP/1.1\r\nHost: euauth.ezvizlife.com\r\nUser-Agent: python-requests/2.25.1\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nConnection: keep-alive\r\nContent-Length: 162\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\n'
send: b'account=user&password=pass&from=from&returnUrl=plugin&host=apiieu.ezvizlife.com'
reply: 'HTTP/1.1 200 OK\r\n'
header: Server: Tengine
header: Date: Sat, 20 Mar 2021 20:05:42 GMT
header: Content-Type: application/json;charset=UTF-8
header: Content-Length: 65
header: Connection: keep-alive
header: X-Powered-By: PS
header: Content-Language: zh-CN
header: Cache-Control: max-age=3600
header: Pragma: cache
header: X-UA-Compatible: IE=Edge,chrome=1
DEBUG:urllib3.connectionpool:https://euauth.ezvizlife.com:443 "POST /doLogin HTTP/1.1" 200 65
Login error: Incorrect Captcha code
hynek5 commented 3 years ago

Any workaround to bypass that?

hynek5 commented 3 years ago

btw is this doc valid? https://open.ys7.com/doc/en/?

RenierM26 commented 3 years ago

Hi There,

That doc is for ezviz's commercial customers. The APIs mentioned require a special API key, the key allows for sub accounts under the profile and won't work as a "general" solution. Some of the error code definitions are correct though.

If you get that error you most likely entered a incorrect password more than once. You can open the i.ezvizlife.com website in Internet explorer or Safari and login (It will ask for a Captha code). Or just wait a few hours.

hynek5 commented 3 years ago

Thanks, yeah it was the case, it works properly now. I was looking for a way to capture image from cameras, for image recognition. Based on implemented endpoints in client.py, I guess I have to use their SDK and the API key. Any idea how to get it?

RenierM26 commented 3 years ago

Hi @hynek5,

I found a user post on the home assistant site where someone mentioned they just sent an email to ezviz. Was some time ago, I try and find it again.

hynek5 commented 3 years ago

@RenierM26 So finally I obtained appKey and secret from their support :)