sampsyo / wideq

reverse-engineered client for the LG SmartThinQ API
https://pypi.org/project/wideq/
MIT License
331 stars 159 forks source link

Page Not Found Error #138

Closed rodenj1 closed 3 years ago

rodenj1 commented 3 years ago

I am seeing a "page not found" error when running the example.py. Since my account it tied to google, I am using this as my login option.

python example.py -c US -l en-US
Log in here:
https://us.m.lgaccount.com/login/sign_in?country=US&language=en-US&svcCode=SVC202&authSvr=oauth2&client_id=LGAO221A02&division=ha&grant_type=password
Then paste the URL where the browser is redirected:

I then go to the page and use my google login and get a "page not found" error.

Then paste the URL where the browser is redirected:
https://us.m.lgaccount.com/login/iabClose/thirdpartylogin?third_party_type=GGL&front_url=https://us.m.lgaccount.com/login/sign_in?country=US&language=en-US&svcCode=SVC202&authSvr=oauth2&client_id=LGAO221A02&onyx_feature=N&division=ha&show_select_country=N&show_add_services=N&oauthTokenExpiredFlag=N&globalFacebook=false&globalGoogle=false&os_type=PC
Traceback (most recent call last):
  File "example.py", line 328, in <module>
    main()
  File "example.py", line 324, in main
    example(args.country, args.language, args.verbose, args.cmd, args.args)
  File "example.py", line 247, in example
    client._auth = authenticate(client.gateway)
  File "example.py", line 27, in authenticate
    return wideq.Auth.from_url(gateway, callback_url)
  File "/config/wideq/wideq/core.py", line 370, in from_url
    access_token, refresh_token = parse_oauth_callback(url)
  File "/config/wideq/wideq/core.py", line 253, in parse_oauth_callback
    return params["access_token"][0], params["refresh_token"][0]
KeyError: 'access_token'
sampsyo commented 3 years ago

As mentioned in the README, Google login does not seem to work.