argrento / huami-token

Script to obtain watch or band bluetooth token from Huami servers
MIT License
412 stars 94 forks source link

Amazfit account : Client Error: Unauthorized for url: https://account.huami.com/v2/client/login #18

Open ncartron opened 4 years ago

ncartron commented 4 years ago

Hi and thanks for this nice initiative.

I wanted to get the BT keys as well as AGPS files from a Stratos 3, but using huami-token from MacOS gives me this error:

➜ ./huami_token.py -m amazfit -e "myemail@domain.tld" -p "redacted" --bt_keys
Getting access token with amazfit login method...
Token: ['redacted']
Logging in...
Traceback (most recent call last):
  File "./huami_token.py", line 252, in <module>
    device.login()
  File "./huami_token.py", line 104, in login
    response.raise_for_status()
  File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://account.huami.com/v2/client/login

I confirmed that the email address and password are correct - that's the ones i used when connecting using the Amazfit / Zepp app on Android.

Any idea?

Thanks! Nico

argrento commented 4 years ago

Hello!

I am not sure, how Stratos 3 AGPS data is downloaded, because I have no Stratos watch. I will add this to the project readme.

Sorry for the inconvenience.

ncartron commented 4 years ago

Hi @argrento and thanks for the answer. I don't think the issue I'm encountering is because of the watch - I had created my Amazfit account before, when I had a GTS.

argrento commented 4 years ago

Are you using VPN or proxy on your PC?

ncartron commented 4 years ago

I am not

-- Nico

On 19 Oct 2020, at 21:15, Kirill Snezhko notifications@github.com wrote:

 Are you using VPN or proxy on your PC?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

argrento commented 4 years ago

Have you tried logging in via Xiaomi account? https://github.com/argrento/huami-token#logging-in-with-xiaomi-account

ncartron commented 4 years ago

I have not, since I only have an Amazfit account, and my Stratos 3 is registered with that account, not a Xiaomi one :)

8ear commented 3 years ago

Do you use an internal account? I used an google account instead of internal and it looks that it does not work for me. So I think the problem here is that I do not use the internal amazfit authentication.