Closed r74tech closed 5 months ago
have you tried disabling SLL verification? https://www.geeksforgeeks.org/how-to-disable-security-certificate-checks-for-requests-in-python/
I've tried everything, I got {'Error': 'BadAuthentication'}
.venv/lib/python3.11/site-packages/gpsoauth/__init__.py
def _perform_auth_request(
data: dict[str, int | str | bytes], proxies: MutableMapping[str, str] | None = None
) -> dict[str, str]:
session = requests.session()
session.mount(AUTH_URL, AuthHTTPAdapter())
if proxies:
session.proxies = proxies
session.headers.update(
{
"Accept-Encoding": "identity",
"Content-type": "application/x-www-form-urlencoded",
"User-Agent": USER_AGENT,
}
)
res = session.post(AUTH_URL, data=data, verify=False)
return google.parse_auth_response(res.text)
def _perform_auth_request(
data: dict[str, int | str | bytes], proxies: MutableMapping[str, str] | None = None
) -> dict[str, str]:
session = requests.session()
session.mount(AUTH_URL, AuthHTTPAdapter())
if proxies:
session.proxies = proxies
session.headers.update(
{
"Accept-Encoding": "identity",
"Content-type": "application/x-www-form-urlencoded",
"User-Agent": USER_AGENT,
}
)
from urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning)
res = session.post(AUTH_URL, data=data, verify=False)
return google.parse_auth_response(res.text)
def _perform_auth_request(
data: dict[str, int | str | bytes], proxies: MutableMapping[str, str] | None = None
) -> dict[str, str]:
session = requests.session()
session.verify = False
session.mount(AUTH_URL, AuthHTTPAdapter())
if proxies:
session.proxies = proxies
session.headers.update(
{
"Accept-Encoding": "identity",
"Content-type": "application/x-www-form-urlencoded",
"User-Agent": USER_AGENT,
}
)
res = session.post(AUTH_URL, data=data)
return google.parse_auth_response(res.text)
we have seen BadAuthentication
happen due to invalid versions of libraries used. Please see
https://github.com/leikoilja/ha-google-home#master-token
and try using docker image with pinned library version that should help you get the master token
Woohoo! I was able to generate it! I did not do enough research! Thank you so much!
awesome, happy to hear that it has helped ;)
Woohoo! I was able to generate it! I did not do enough research! Thank you so much!
how did u get it to work?
https://github.com/leikoilja/ha-google-home#master-token
I just moved it according to the method described here.
Describe the bug I am trying to get a master token using the example script. I logged in using the app password, but the script outputs an error. The account I am trying to log in to is 2FA.
To Reproduce Steps to reproduce the behavior:
Expected behavior Output of master token
Additional context Error logs: