tesla: ERROR for site owner: Invalid domain for site key

Version of the custom_component

0.2.1

Configuration

n/a

Describe the bug

In the tesla login page that is proxied, the Captcha doesn’t load

image

Page URL in browser is :

https://myhomeassistantdomain/auth/tesla/proxy?config_flow_id=57a927ee399f4c178b1a6cc476ee35c1&callback_url=https://myhomeassistantdomain/auth/tesla/callback?flow_id%3D57a927ee399f4c178b1a6cc476ee35c1

Debug log

2021-09-04 19:48:24 DEBUG (MainThread) [custom_components.tesla_custom.config_flow] Found flow_id; adding 10.1.0.42 to known_ips for 300 seconds
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Received get: https://myhomeassistant.mydomain/auth/tesla/proxy?config_flow_id=e5e4f5a18c31464cae282cb57b0dc019&callback_url=https://myhomeassistant.mydomain/auth/tesla/callback?flow_id%3De5e4f5a18c31464cae282cb57b0dc019 for https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Starting auth capture proxy for https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Final headers {'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Connection': 'keep-alive', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15', 'Accept-Language': 'en-us', 'Referer': 'https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA', 'Accept-Encoding': 'gzip, deflate, br', 'x-tesla-user-agent': 'TeslaApp/3.10.9-433/adff2e065/android/10', 'X-Requested-With': 'com.teslamotors.tesla'}
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Attempting get to https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA
headers: {'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Connection': 'keep-alive', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15', 'Accept-Language': 'en-us', 'Referer': 'https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA', 'Accept-Encoding': 'gzip, deflate, br', 'x-tesla-user-agent': 'TeslaApp/3.10.9-433/adff2e065/android/10', 'X-Requested-With': 'com.teslamotors.tesla'}
cookies: <CookieJar[]>
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] GET:
https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA with
{"host": "auth.tesla.com", "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "accept-encoding": "gzip, deflate, br", "connection": "keep-alive", "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15", "accept-language": "en-us", "referer": "https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA", "x-tesla-user-agent": "TeslaApp/3.10.9-433/adff2e065/android/10", "x-requested-with": "com.teslamotors.tesla"}
returned 200:OK with response Headers([('content-type', 'text/html; charset=utf-8'), ('x-dns-prefetch-control', 'off'), ('x-frame-options', 'DENY'), ('strict-transport-security', 'max-age=15552000; includeSubDomains'), ('x-download-options', 'noopen'), ('x-content-type-options', 'nosniff'), ('x-xss-protection', '1; mode=block'), ('x-request-id', 'c98fd737-9f8d-49cf-a808-879d99dbb2bd'), ('x-correlation-id', 'c98fd737-9f8d-49cf-a808-879d99dbb2bd'), ('cache-control', 'no-store'), ('content-security-policy', "connect-src 'self'; default-src 'none'; font-src 'self' data: fonts.gstatic.com; frame-src 'self' www.google.com www.recaptcha.net; img-src 'self' data:; script-src www.recaptcha.net 'self' 'nonce-bb5c161230a3934f834a'; style-src 'unsafe-inline' 'self'"), ('etag', 'W/"709a-rs8SRDKsYNnmvSHcERim/Rvo/TU"'), ('x-response-time', '20.291ms'), ('content-encoding', 'gzip'), ('x-edgeconnect-midmile-rtt', '16'), ('x-edgeconnect-origin-mex-latency', '175'), ('originip', '209.133.79.56'), ('x-akamai-transformed', '9 6251 0 pmb=mTOE,1'), ('date', 'Sat, 04 Sep 2021 17:48:24 GMT'), ('content-length', '6090'), ('connection', 'keep-alive'), ('vary', 'Accept-Encoding'), ('set-cookie', 'tesla-auth.sid=s%3AarDrMEgjr9U7ajsldIHGSyrfT1VYPhOM.EbBQKQy24%2BbtqnGFhGA9um2eDDR%2F9Ooux3loRDg0of4; Path=/; Expires=Tue, 07 Sep 2021 17:48:24 GMT; HttpOnly; Secure; SameSite=Lax'), ('origin_hostname', 'auth.tesla.com'), ('permissions-policy', 'interest-cohort=()'), ('set-cookie', '_abck=F7596CF8A824099CB6D526AC660394D2~-1~YAAQ0nRZaIFRyZ17AQAApv/ssQax2rEvAoEVSCm+LrA0f4gPT6HUiTcheIG34/CSLRAX4nL7KKQovkSKPCIMTooj9kn0ymZcak3ASIZ0/oc9+WYGz5zCo4xH02NNn4lgkZOysy6Q4SU0M2R32lpABG96FWOXbWL/iApmiD7QDRqynv4CcS6lY8UMylB0Ee1/gbTQ3wofptmzM/UxE5oAgB6rw1VKKii8uuo8e+HhJkstLS+QoFu8qdc4VFB5nOoZxx0S9zrkPTwXVvvA6xytlF4RYmFvWkDZl44lqM3faNF8nW6AdsawHeeUqycR8F+Am8ZI6z/aOSA7jInl2kEIafUVEZKNqvBx5eiPt+wo+3/jE3ETgafUkI2elvg=~-1~-1~-1; Domain=.tesla.com; Path=/; Expires=Sun, 04 Sep 2022 17:48:24 GMT; Max-Age=31536000; Secure'), ('set-cookie', 'ak_bmsc=86D6AA52AA22E3528A4E7BFCFDAE87F5~000000000000000000000000000000~YAAQ0nRZaIJRyZ17AQAApv/ssQ2fQnUh5UB7b03KViDtLWMNQbTZ6CJrHGX0R6Q0DDYVQM3mUyzBw9tQVlrnubgKXskheZZnMZ8/wXVgEO4XDswHTloX6KXWvpKyHtWG7Pypp4rhZZM4I05xJR2/swDU8NnjfD/15pFoNjs7epWNK3jadYhslcorUH1VqPhXFTJBT5XSMazYx53SIEmtLOnoDXWO4baA4dP8522B/SAY3VfLuLuVnVDSevV7q8V4ATNcRT4iqBArQPPtNDCc0ycTQBjbhkvcHaDxkCq2hgKt1tk4N+wV/xhReTGxMV0WjKkSwmx7kevNNDnEsOr1j8DQr2fE3uJiqVeEdGJQ6L4tIm5cE39sqH7t; Domain=.tesla.com; Path=/; Expires=Sat, 04 Sep 2021 19:48:24 GMT; Max-Age=7200; HttpOnly'), ('set-cookie', 'bm_sz=C034275AB655FEF9C8B9502642C0B967~YAAQ0nRZaINRyZ17AQAApv/ssQ20xVaSdef2MBbK/UZzR3Jy+VwkejzO/wXc6ZM4C2W7qIW2woUNL6ki96UJNBl0iVqGj09qenAxyiEI2t2u1g7blIPzAgxEmhryeBU//eJROqu1+AM5055Tv4sqyxuI41nNgRcq1M+wXrfKUJt8211vrD4Km0alZG9uzqeu5kNv4AuykI9p8dbVrLjwdUB60CqOOdV6T+/SqUjfpHNpPLgua4zeVN/c9gktnEqeUbjhtuB2yjwYv/UfEJouJSEnchMKYpwTQXAe4Xixa6neXQ==~3486773~4405060; Domain=.tesla.com; Path=/; Expires=Sat, 04 Sep 2021 21:48:24 GMT; Max-Age=14400')])
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Refreshed 1 tests: ['test_url']
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running coroutine test_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Refreshed 5 modifiers: ['prepend_relative_urls', 'change_host_to_proxy', 'change_empty_to_proxy', 'prepend_url_ajax', 'prepend_url_i18n']
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running coroutine prepend_relative_urls
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for script:src /static/js/i18next.bundle.min.js -> https://myhomeassistant.mydomain/auth/tesla/proxy/static/js/i18next.bundle.min.js
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for script:src /static/js/tds4-i18n.js -> https://myhomeassistant.mydomain/auth/tesla/proxy/static/js/tds4-i18n.js
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for script:src /static/js/minimal.bundle.js -> https://myhomeassistant.mydomain/auth/tesla/proxy/static/js/minimal.bundle.js
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for script:src /static/scripts/utils.js -> https://myhomeassistant.mydomain/auth/tesla/proxy/static/scripts/utils.js
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for script:src /static/js/tds4-site.js -> https://myhomeassistant.mydomain/auth/tesla/proxy/static/js/tds4-site.js
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for script:src /static/js/tds-text-inputs--password.js -> https://myhomeassistant.mydomain/auth/tesla/proxy/static/js/tds-text-inputs--password.js
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for script:src /VWl_M/DC/RL/vaO3/5yqzowz/ti5uk00p3r/SFwXZkc/QUELIm/ZyEms -> https://myhomeassistant.mydomain/auth/tesla/proxy/VWl_M/DC/RL/vaO3/5yqzowz/ti5uk00p3r/SFwXZkc/QUELIm/ZyEms
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for link:href /static/css/tds4-minimal.bundle.css -> https://myhomeassistant.mydomain/auth/tesla/proxy/static/css/tds4-minimal.bundle.css
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for link:href /static/css/tds4-shims.min.css -> https://myhomeassistant.mydomain/auth/tesla/proxy/static/css/tds4-shims.min.css
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for a:href /user/password/forgot -> https://myhomeassistant.mydomain/auth/tesla/proxy/user/password/forgot
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
[...]
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running coroutine change_host_to_proxy
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function swap_url
[...]
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for a:href https://www.tesla.com/support/tesla-app?redirect=no#privacy -> https://www.tesla.com/support/tesla-app?redirect=no
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function swap_url
[...]
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running function swap_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running coroutine change_empty_to_proxy
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running coroutine prepend_url_ajax
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Found 0 patterns for method_func
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Received get: https://myhomeassistant.mydomain/auth/tesla/proxy/VWl_M/DC/RL/vaO3/5yqzowz/ti5uk00p3r/SFwXZkc/QUELIm/ZyEms for https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Final headers {'Accept': '*/*', 'Connection': 'keep-alive', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15', 'Accept-Language': 'en-us', 'Referer': 'https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA', 'Accept-Encoding': 'gzip, deflate, br', 'x-tesla-user-agent': 'TeslaApp/3.10.9-433/adff2e065/android/10', 'X-Requested-With': 'com.teslamotors.tesla'}
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Attempting get to https://auth.tesla.com/VWl_M/DC/RL/vaO3/5yqzowz/ti5uk00p3r/SFwXZkc/QUELIm/ZyEms
headers: {'Accept': '*/*', 'Connection': 'keep-alive', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15', 'Accept-Language': 'en-us', 'Referer': 'https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA', 'Accept-Encoding': 'gzip, deflate, br', 'x-tesla-user-agent': 'TeslaApp/3.10.9-433/adff2e065/android/10', 'X-Requested-With': 'com.teslamotors.tesla'}
cookies: <CookieJar[<Cookie _abck=F7596CF8A824099CB6D526AC660394D2~-1~YAAQ0nRZaIFRyZ17AQAApv/ssQax2rEvAoEVSCm+LrA0f4gPT6HUiTcheIG34/CSLRAX4nL7KKQovkSKPCIMTooj9kn0ymZcak3ASIZ0/oc9+WYGz5zCo4xH02NNn4lgkZOysy6Q4SU0M2R32lpABG96FWOXbWL/iApmiD7QDRqynv4CcS6lY8UMylB0Ee1/gbTQ3wofptmzM/UxE5oAgB6rw1VKKii8uuo8e+HhJkstLS+QoFu8qdc4VFB5nOoZxx0S9zrkPTwXVvvA6xytlF4RYmFvWkDZl44lqM3faNF8nW6AdsawHeeUqycR8F+Am8ZI6z/aOSA7jInl2kEIafUVEZKNqvBx5eiPt+wo+3/jE3ETgafUkI2elvg=~-1~-1~-1 for .tesla.com/>, <Cookie ak_bmsc=86D6AA52AA22E3528A4E7BFCFDAE87F5~000000000000000000000000000000~YAAQ0nRZaIJRyZ17AQAApv/ssQ2fQnUh5UB7b03KViDtLWMNQbTZ6CJrHGX0R6Q0DDYVQM3mUyzBw9tQVlrnubgKXskheZZnMZ8/wXVgEO4XDswHTloX6KXWvpKyHtWG7Pypp4rhZZM4I05xJR2/swDU8NnjfD/15pFoNjs7epWNK3jadYhslcorUH1VqPhXFTJBT5XSMazYx53SIEmtLOnoDXWO4baA4dP8522B/SAY3VfLuLuVnVDSevV7q8V4ATNcRT4iqBArQPPtNDCc0ycTQBjbhkvcHaDxkCq2hgKt1tk4N+wV/xhReTGxMV0WjKkSwmx7kevNNDnEsOr1j8DQr2fE3uJiqVeEdGJQ6L4tIm5cE39sqH7t for .tesla.com/>, <Cookie bm_sz=C034275AB655FEF9C8B9502642C0B967~YAAQ0nRZaINRyZ17AQAApv/ssQ20xVaSdef2MBbK/UZzR3Jy+VwkejzO/wXc6ZM4C2W7qIW2woUNL6ki96UJNBl0iVqGj09qenAxyiEI2t2u1g7blIPzAgxEmhryeBU//eJROqu1+AM5055Tv4sqyxuI41nNgRcq1M+wXrfKUJt8211vrD4Km0alZG9uzqeu5kNv4AuykI9p8dbVrLjwdUB60CqOOdV6T+/SqUjfpHNpPLgua4zeVN/c9gktnEqeUbjhtuB2yjwYv/UfEJouJSEnchMKYpwTQXAe4Xixa6neXQ==~3486773~4405060 for .tesla.com/>, <Cookie tesla-auth.sid=s%3AarDrMEgjr9U7ajsldIHGSyrfT1VYPhOM.EbBQKQy24%2BbtqnGFhGA9um2eDDR%2F9Ooux3loRDg0of4 for auth.tesla.com/>]>
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] GET:
https://auth.tesla.com/VWl_M/DC/RL/vaO3/5yqzowz/ti5uk00p3r/SFwXZkc/QUELIm/ZyEms with
{"host": "auth.tesla.com", "accept": "*/*", "accept-encoding": "gzip, deflate, br", "connection": "keep-alive", "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15", "accept-language": "en-us", "referer": "https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA", "x-tesla-user-agent": "TeslaApp/3.10.9-433/adff2e065/android/10", "x-requested-with": "com.teslamotors.tesla", "cookie": {"_abck": "F7596CF8A824099CB6D526AC660394D2~-1~YAAQ0nRZaIFRyZ17AQAApv/ssQax2rEvAoEVSCm+LrA0f4gPT6HUiTcheIG34/CSLRAX4nL7KKQovkSKPCIMTooj9kn0ymZcak3ASIZ0/oc9+WYGz5zCo4xH02NNn4lgkZOysy6Q4SU0M2R32lpABG96FWOXbWL/iApmiD7QDRqynv4CcS6lY8UMylB0Ee1/gbTQ3wofptmzM/UxE5oAgB6rw1VKKii8uuo8e+HhJkstLS+QoFu8qdc4VFB5nOoZxx0S9zrkPTwXVvvA6xytlF4RYmFvWkDZl44lqM3faNF8nW6AdsawHeeUqycR8F+Am8ZI6z/aOSA7jInl2kEIafUVEZKNqvBx5eiPt+wo+3/jE3ETgafUkI2elvg=~-1~-1~-1", "ak_bmsc": "86D6AA52AA22E3528A4E7BFCFDAE87F5~000000000000000000000000000000~YAAQ0nRZaIJRyZ17AQAApv/ssQ2fQnUh5UB7b03KViDtLWMNQbTZ6CJrHGX0R6Q0DDYVQM3mUyzBw9tQVlrnubgKXskheZZnMZ8/wXVgEO4XDswHTloX6KXWvpKyHtWG7Pypp4rhZZM4I05xJR2/swDU8NnjfD/15pFoNjs7epWNK3jadYhslcorUH1VqPhXFTJBT5XSMazYx53SIEmtLOnoDXWO4baA4dP8522B/SAY3VfLuLuVnVDSevV7q8V4ATNcRT4iqBArQPPtNDCc0ycTQBjbhkvcHaDxkCq2hgKt1tk4N+wV/xhReTGxMV0WjKkSwmx7kevNNDnEsOr1j8DQr2fE3uJiqVeEdGJQ6L4tIm5cE39sqH7t", "bm_sz": "C034275AB655FEF9C8B9502642C0B967~YAAQ0nRZaINRyZ17AQAApv/ssQ20xVaSdef2MBbK/UZzR3Jy+VwkejzO/wXc6ZM4C2W7qIW2woUNL6ki96UJNBl0iVqGj09qenAxyiEI2t2u1g7blIPzAgxEmhryeBU//eJROqu1+AM5055Tv4sqyxuI41nNgRcq1M+wXrfKUJt8211vrD4Km0alZG9uzqeu5kNv4AuykI9p8dbVrLjwdUB60CqOOdV6T+/SqUjfpHNpPLgua4zeVN/c9gktnEqeUbjhtuB2yjwYv/UfEJouJSEnchMKYpwTQXAe4Xixa6neXQ==~3486773~4405060", "tesla-auth.sid": "s%3AarDrMEgjr9U7ajsldIHGSyrfT1VYPhOM.EbBQKQy24%2BbtqnGFhGA9um2eDDR%2F9Ooux3loRDg0of4"}}
returned 200:OK with response Headers({'last-modified': 'Mon, 26 Apr 2021 16:10:06 GMT', 'etag': '"d1dbb955755ca44a0b872a64f97c471a45b14e941f69d082c19f792576ae34fb"', 'content-type': 'application/javascript', 'content-encoding': 'gzip', 'content-length': '19642', 'expires': 'Wed, 08 Sep 2021 10:32:21 GMT', 'date': 'Sat, 04 Sep 2021 17:48:24 GMT', 'connection': 'keep-alive', 'vary': 'Accept-Encoding', 'cache-control': 'max-age=21600', 'origin_hostname': 'auth.tesla.com', 'permissions-policy': 'interest-cohort=()', 'set-cookie': '_abck=F7596CF8A824099CB6D526AC660394D2~-1~YAAQ0nRZaJ1RyZ17AQAAkwHtsQaSxPpvlS4ZvXB0GcmrdCdPk6z6KcnQyaI8/CT08szpvUEa/pGvWIY4VGXz2A0ee4I62HUxco+TJytvEHUY769dgP8vfrP0icrZXjQQA4YeY9xOv5Pblh2rL0QRJRhxx5nhKSGfMi2jWjaKBPCQ0WaG6JVlUOqMPdelZRrENZLheWM3eHZedTKfmEsR2vIw5+EN37YMs2ySFGKoWJiEL3ynhsuvJ7DLIvHX4cxaw0y83aI1t5yXvvO1igrBni7t+oN2R/jFG+Zvdymgj/Av09X+fAPJY3K3zEx2O8COG2dgumy6ZI97m/G/kkDIqQ95IJxRB/UBdQoWUcBZUTi6ufAz+emrPHx5WkiVp3Wiz9r+9nWoeW8GJg==~-1~-1~-1; Domain=.tesla.com; Path=/; Expires=Sun, 04 Sep 2022 17:48:24 GMT; Max-Age=31536000; Secure'})
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Refreshed 1 tests: ['test_url']
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running coroutine test_url
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.helper] Running coroutine prepend_url_i18n
2021-09-04 19:48:24 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Found 0 patterns for method_func
2021-09-04 19:48:25 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Received post: https://myhomeassistant.mydomain/auth/tesla/proxy/VWl_M/DC/RL/vaO3/5yqzowz/ti5uk00p3r/SFwXZkc/QUELIm/ZyEms for https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA
2021-09-04 19:48:25 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Storing json {'sensor_data': '7a74G7m23Vrp0o5c9271081.7-1,2,-94,-100,Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15,uaend,11011,20030107,en-gb,Gecko,1,0,0,0,401248,7705038,2560,1342,2560,1440,1616,1182,1616,,cpen:0,i1:0,dm:0,cwen:0,non:1,opc:0,fc:0,sc:0,wrc:1,isc:0,vib:0,bat:0,x11:0,x12:1,8923,0.218032634109,815388852519,0,loc:-1,2,-94,-101,do_dis,dm_dis,t_dis-1,2,-94,-105,0,0,0,1,1960,874,0;1,0,0,1,2137,1051,0;-1,2,-94,-102,0,0,0,1,1960,874,0;1,0,0,1,2137,1051,0;-1,2,-94,-108,-1,2,-94,-110,-1,2,-94,-117,-1,2,-94,-111,-1,2,-94,-109,-1,2,-94,-114,-1,2,-94,-103,-1,2,-94,-112,https://myhomeassistant.mydomain/auth/tesla/proxy?config_flow_id=e5e4f5a18c31464cae282cb57b0dc019&callback_url=https://myhomeassistant.mydomain/auth/tesla/callback?flow_id%3De5e4f5a18c31464cae282cb57b0dc019-1,2,-94,-115,1,32,32,0,0,0,0,2,0,1630777705038,-999999,17445,0,0,2907,0,0,4,0,1,2,50,-1,-1,26018161,PiZtE,14672,77,0,-1-1,2,-94,-106,0,0-1,2,-94,-119,-1-1,2,-94,-122,0,0,0,0,1,0,0-1,2,-94,-123,-1,2,-94,-124,-1,2,-94,-126,-1,2,-94,-127,6-1,2,-94,-70,-1-1,2,-94,-80,94-1,2,-94,-116,208036032-1,2,-94,-118,66469-1,2,-94,-129,-1,2,-94,-121,;3;-1;0'}
2021-09-04 19:48:25 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Final headers {'Content-Type': 'text/plain;charset=UTF-8', 'Origin': 'https://auth.tesla.com', 'Accept-Encoding': 'gzip, deflate, br', 'Connection': 'keep-alive', 'Accept': '*/*', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15', 'Referer': 'https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA', 'Accept-Language': 'en-us', 'x-tesla-user-agent': 'TeslaApp/3.10.9-433/adff2e065/android/10', 'X-Requested-With': 'com.teslamotors.tesla'}
2021-09-04 19:48:25 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Attempting post to https://auth.tesla.com/VWl_M/DC/RL/vaO3/5yqzowz/ti5uk00p3r/SFwXZkc/QUELIm/ZyEms
headers: {'Content-Type': 'text/plain;charset=UTF-8', 'Origin': 'https://auth.tesla.com', 'Accept-Encoding': 'gzip, deflate, br', 'Connection': 'keep-alive', 'Accept': '*/*', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15', 'Referer': 'https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA', 'Accept-Language': 'en-us', 'x-tesla-user-agent': 'TeslaApp/3.10.9-433/adff2e065/android/10', 'X-Requested-With': 'com.teslamotors.tesla'}
cookies: <CookieJar[<Cookie _abck=F7596CF8A824099CB6D526AC660394D2~-1~YAAQ0nRZaJ1RyZ17AQAAkwHtsQaSxPpvlS4ZvXB0GcmrdCdPk6z6KcnQyaI8/CT08szpvUEa/pGvWIY4VGXz2A0ee4I62HUxco+TJytvEHUY769dgP8vfrP0icrZXjQQA4YeY9xOv5Pblh2rL0QRJRhxx5nhKSGfMi2jWjaKBPCQ0WaG6JVlUOqMPdelZRrENZLheWM3eHZedTKfmEsR2vIw5+EN37YMs2ySFGKoWJiEL3ynhsuvJ7DLIvHX4cxaw0y83aI1t5yXvvO1igrBni7t+oN2R/jFG+Zvdymgj/Av09X+fAPJY3K3zEx2O8COG2dgumy6ZI97m/G/kkDIqQ95IJxRB/UBdQoWUcBZUTi6ufAz+emrPHx5WkiVp3Wiz9r+9nWoeW8GJg==~-1~-1~-1 for .tesla.com/>, <Cookie ak_bmsc=86D6AA52AA22E3528A4E7BFCFDAE87F5~000000000000000000000000000000~YAAQ0nRZaIJRyZ17AQAApv/ssQ2fQnUh5UB7b03KViDtLWMNQbTZ6CJrHGX0R6Q0DDYVQM3mUyzBw9tQVlrnubgKXskheZZnMZ8/wXVgEO4XDswHTloX6KXWvpKyHtWG7Pypp4rhZZM4I05xJR2/swDU8NnjfD/15pFoNjs7epWNK3jadYhslcorUH1VqPhXFTJBT5XSMazYx53SIEmtLOnoDXWO4baA4dP8522B/SAY3VfLuLuVnVDSevV7q8V4ATNcRT4iqBArQPPtNDCc0ycTQBjbhkvcHaDxkCq2hgKt1tk4N+wV/xhReTGxMV0WjKkSwmx7kevNNDnEsOr1j8DQr2fE3uJiqVeEdGJQ6L4tIm5cE39sqH7t for .tesla.com/>, <Cookie bm_sz=C034275AB655FEF9C8B9502642C0B967~YAAQ0nRZaINRyZ17AQAApv/ssQ20xVaSdef2MBbK/UZzR3Jy+VwkejzO/wXc6ZM4C2W7qIW2woUNL6ki96UJNBl0iVqGj09qenAxyiEI2t2u1g7blIPzAgxEmhryeBU//eJROqu1+AM5055Tv4sqyxuI41nNgRcq1M+wXrfKUJt8211vrD4Km0alZG9uzqeu5kNv4AuykI9p8dbVrLjwdUB60CqOOdV6T+/SqUjfpHNpPLgua4zeVN/c9gktnEqeUbjhtuB2yjwYv/UfEJouJSEnchMKYpwTQXAe4Xixa6neXQ==~3486773~4405060 for .tesla.com/>, <Cookie tesla-auth.sid=s%3AarDrMEgjr9U7ajsldIHGSyrfT1VYPhOM.EbBQKQy24%2BbtqnGFhGA9um2eDDR%2F9Ooux3loRDg0of4 for auth.tesla.com/>]>
2021-09-04 19:48:25 DEBUG (MainThread) [authcaptureproxy.helper] POST:
https://auth.tesla.com/VWl_M/DC/RL/vaO3/5yqzowz/ti5uk00p3r/SFwXZkc/QUELIm/ZyEms with
{"host": "auth.tesla.com", "accept": "*/*", "accept-encoding": "gzip, deflate, br", "connection": "keep-alive", "user-agent": "python-httpx/0.19.0", "content-type": "text/plain;charset=UTF-8", "referer": "https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA", "accept-language": "en-us", "x-tesla-user-agent": "TeslaApp/3.10.9-433/adff2e065/android/10", "x-requested-with": "com.teslamotors.tesla", "cookie": {"_abck": "F7596CF8A824099CB6D526AC660394D2~-1~YAAQ0nRZaJ1RyZ17AQAAkwHtsQaSxPpvlS4ZvXB0GcmrdCdPk6z6KcnQyaI8/CT08szpvUEa/pGvWIY4VGXz2A0ee4I62HUxco+TJytvEHUY769dgP8vfrP0icrZXjQQA4YeY9xOv5Pblh2rL0QRJRhxx5nhKSGfMi2jWjaKBPCQ0WaG6JVlUOqMPdelZRrENZLheWM3eHZedTKfmEsR2vIw5+EN37YMs2ySFGKoWJiEL3ynhsuvJ7DLIvHX4cxaw0y83aI1t5yXvvO1igrBni7t+oN2R/jFG+Zvdymgj/Av09X+fAPJY3K3zEx2O8COG2dgumy6ZI97m/G/kkDIqQ95IJxRB/UBdQoWUcBZUTi6ufAz+emrPHx5WkiVp3Wiz9r+9nWoeW8GJg==~-1~-1~-1", "ak_bmsc": "86D6AA52AA22E3528A4E7BFCFDAE87F5~000000000000000000000000000000~YAAQ0nRZaIJRyZ17AQAApv/ssQ2fQnUh5UB7b03KViDtLWMNQbTZ6CJrHGX0R6Q0DDYVQM3mUyzBw9tQVlrnubgKXskheZZnMZ8/wXVgEO4XDswHTloX6KXWvpKyHtWG7Pypp4rhZZM4I05xJR2/swDU8NnjfD/15pFoNjs7epWNK3jadYhslcorUH1VqPhXFTJBT5XSMazYx53SIEmtLOnoDXWO4baA4dP8522B/SAY3VfLuLuVnVDSevV7q8V4ATNcRT4iqBArQPPtNDCc0ycTQBjbhkvcHaDxkCq2hgKt1tk4N+wV/xhReTGxMV0WjKkSwmx7kevNNDnEsOr1j8DQr2fE3uJiqVeEdGJQ6L4tIm5cE39sqH7t", "bm_sz": "C034275AB655FEF9C8B9502642C0B967~YAAQ0nRZaINRyZ17AQAApv/ssQ20xVaSdef2MBbK/UZzR3Jy+VwkejzO/wXc6ZM4C2W7qIW2woUNL6ki96UJNBl0iVqGj09qenAxyiEI2t2u1g7blIPzAgxEmhryeBU//eJROqu1+AM5055Tv4sqyxuI41nNgRcq1M+wXrfKUJt8211vrD4Km0alZG9uzqeu5kNv4AuykI9p8dbVrLjwdUB60CqOOdV6T+/SqUjfpHNpPLgua4zeVN/c9gktnEqeUbjhtuB2yjwYv/UfEJouJSEnchMKYpwTQXAe4Xixa6neXQ==~3486773~4405060", "tesla-auth.sid": "s%3AarDrMEgjr9U7ajsldIHGSyrfT1VYPhOM.EbBQKQy24%2BbtqnGFhGA9um2eDDR%2F9Ooux3loRDg0of4"}, "content-length": "1192"}
returned 201:Created with response Headers({'content-length': '22', 'access-control-allow-headers': 'Content-Type,Authorization', 'access-control-allow-origin': '*', 'date': 'Sat, 04 Sep 2021 17:48:25 GMT', 'connection': 'keep-alive', 'content-type': 'application/json', 'origin_hostname': 'auth.tesla.com', 'originip': '127.0.0.1', 'permissions-policy': 'interest-cohort=()', 'set-cookie': '_abck=F7596CF8A824099CB6D526AC660394D2~-1~YAAQ0nRZaKhRyZ17AQAA9gLtsQZLGr2VdHT3nHrFAZe9tOn1pHmXYuPOAsSYaMN+bKN8UvXy4HjDTdNp/iQXva4Tq0aL8HUT93Q4Aw4pFr48YS/HvOaMB74iPJdl6qkOa8wPMxM25Ul/T0/9GX6GqWgsCUSSoUYztPOsberIj58Cj5eGMKAxKZAZXTUcWKNFHyOzNgkR6bzQxn63T2a2UtElAOGm+bcIy3r5f53I5bpmjeb9qbj1MnMuQwfqwQCQ4SSBMGE1BbSVnFjr7tgIp+ymyNb4SRC09U4jfya8BBLoOThH7+ANARnbXd3gNSy9J3Jjn4DMxGrGP74x86tXtH/PK0AatRnc+QaeoNXi9go9UWxkPY3xyge0W//fD0b+6ET/QZ8ErbxWlg==~-1~-1~-1; Domain=.tesla.com; Path=/; Expires=Sun, 04 Sep 2022 17:48:25 GMT; Max-Age=31536000; Secure'})
2021-09-04 19:48:25 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Refreshed 1 tests: ['test_url']
2021-09-04 19:48:25 DEBUG (MainThread) [authcaptureproxy.helper] Running coroutine test_url
2021-09-04 19:48:25 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Passing through ZyEms as application/json
2021-09-04 19:48:25 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Received post: https://myhomeassistant.mydomain/auth/tesla/proxy/VWl_M/DC/RL/vaO3/5yqzowz/ti5uk00p3r/SFwXZkc/QUELIm/ZyEms for https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA
2021-09-04 19:48:25 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Storing json {'sensor_data': '7a74G7m23Vrp0o5c9271081.7-1,2,-94,-100,Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15,uaend,11011,20030107,en-gb,Gecko,1,0,0,0,401248,7705038,2560,1342,2560,1440,1616,1182,1616,,cpen:0,i1:0,dm:0,cwen:0,non:1,opc:0,fc:0,sc:0,wrc:1,isc:0,vib:0,bat:0,x11:0,x12:1,8923,0.553902510276,815388852519,0,loc:-1,2,-94,-101,do_dis,dm_dis,t_dis-1,2,-94,-105,0,0,0,1,1960,874,0;1,0,0,1,2137,1051,0;-1,2,-94,-102,0,0,0,1,1960,874,0;1,0,0,1,2137,1051,0;-1,2,-94,-108,-1,2,-94,-110,-1,2,-94,-117,-1,2,-94,-111,-1,2,-94,-109,-1,2,-94,-114,-1,2,-94,-103,-1,2,-94,-112,https://myhomeassistant.mydomain/auth/tesla/proxy?config_flow_id=e5e4f5a18c31464cae282cb57b0dc019&callback_url=https://myhomeassistant.mydomain/auth/tesla/callback?flow_id%3De5e4f5a18c31464cae282cb57b0dc019-1,2,-94,-115,1,32,32,0,0,0,0,588,0,1630777705038,12,17445,0,0,2907,0,0,588,0,1,2,50,437,1490478648,26018161,PiZtE,83930,107,0,-1-1,2,-94,-106,9,1-1,2,-94,-119,200,0,0,0,0,0,0,0,0,0,0,0,0,200,-1,2,-94,-122,0,0,0,0,1,0,0-1,2,-94,-123,-1,2,-94,-124,-1,2,-94,-126,-1,2,-94,-127,6-1,2,-94,-70,-356158881;-894418032;dis;;true;true;true;-120;true;24;24;true;false;-1-1,2,-94,-80,5378-1,2,-94,-116,208036032-1,2,-94,-118,68409-1,2,-94,-129,4d624c99ce55b315c4f2eddf110ab32c60f386cf5ccf175f66d4b8ecaf332b09,1,46b78825e671e79042d6477c5e50fbb644ee6aa0247817cc2b5ee5d1b9058939,Apple Inc.,Apple GPU,847f317542226f5fc40f6864287d658e1815d8fcb65bfffd759afb7588dd4529,26-1,2,-94,-121,;151;6;0'}
2021-09-04 19:48:25 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Final headers {'Content-Type': 'text/plain;charset=UTF-8', 'Origin': 'https://auth.tesla.com', 'Accept-Encoding': 'gzip, deflate, br', 'Connection': 'keep-alive', 'Accept': '*/*', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15', 'Referer': 'https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA', 'Accept-Language': 'en-us', 'x-tesla-user-agent': 'TeslaApp/3.10.9-433/adff2e065/android/10', 'X-Requested-With': 'com.teslamotors.tesla'}
2021-09-04 19:48:25 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Attempting post to https://auth.tesla.com/VWl_M/DC/RL/vaO3/5yqzowz/ti5uk00p3r/SFwXZkc/QUELIm/ZyEms
headers: {'Content-Type': 'text/plain;charset=UTF-8', 'Origin': 'https://auth.tesla.com', 'Accept-Encoding': 'gzip, deflate, br', 'Connection': 'keep-alive', 'Accept': '*/*', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15', 'Referer': 'https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA', 'Accept-Language': 'en-us', 'x-tesla-user-agent': 'TeslaApp/3.10.9-433/adff2e065/android/10', 'X-Requested-With': 'com.teslamotors.tesla'}
cookies: <CookieJar[<Cookie _abck=F7596CF8A824099CB6D526AC660394D2~-1~YAAQ0nRZaKhRyZ17AQAA9gLtsQZLGr2VdHT3nHrFAZe9tOn1pHmXYuPOAsSYaMN+bKN8UvXy4HjDTdNp/iQXva4Tq0aL8HUT93Q4Aw4pFr48YS/HvOaMB74iPJdl6qkOa8wPMxM25Ul/T0/9GX6GqWgsCUSSoUYztPOsberIj58Cj5eGMKAxKZAZXTUcWKNFHyOzNgkR6bzQxn63T2a2UtElAOGm+bcIy3r5f53I5bpmjeb9qbj1MnMuQwfqwQCQ4SSBMGE1BbSVnFjr7tgIp+ymyNb4SRC09U4jfya8BBLoOThH7+ANARnbXd3gNSy9J3Jjn4DMxGrGP74x86tXtH/PK0AatRnc+QaeoNXi9go9UWxkPY3xyge0W//fD0b+6ET/QZ8ErbxWlg==~-1~-1~-1 for .tesla.com/>, <Cookie ak_bmsc=86D6AA52AA22E3528A4E7BFCFDAE87F5~000000000000000000000000000000~YAAQ0nRZaIJRyZ17AQAApv/ssQ2fQnUh5UB7b03KViDtLWMNQbTZ6CJrHGX0R6Q0DDYVQM3mUyzBw9tQVlrnubgKXskheZZnMZ8/wXVgEO4XDswHTloX6KXWvpKyHtWG7Pypp4rhZZM4I05xJR2/swDU8NnjfD/15pFoNjs7epWNK3jadYhslcorUH1VqPhXFTJBT5XSMazYx53SIEmtLOnoDXWO4baA4dP8522B/SAY3VfLuLuVnVDSevV7q8V4ATNcRT4iqBArQPPtNDCc0ycTQBjbhkvcHaDxkCq2hgKt1tk4N+wV/xhReTGxMV0WjKkSwmx7kevNNDnEsOr1j8DQr2fE3uJiqVeEdGJQ6L4tIm5cE39sqH7t for .tesla.com/>, <Cookie bm_sz=C034275AB655FEF9C8B9502642C0B967~YAAQ0nRZaINRyZ17AQAApv/ssQ20xVaSdef2MBbK/UZzR3Jy+VwkejzO/wXc6ZM4C2W7qIW2woUNL6ki96UJNBl0iVqGj09qenAxyiEI2t2u1g7blIPzAgxEmhryeBU//eJROqu1+AM5055Tv4sqyxuI41nNgRcq1M+wXrfKUJt8211vrD4Km0alZG9uzqeu5kNv4AuykI9p8dbVrLjwdUB60CqOOdV6T+/SqUjfpHNpPLgua4zeVN/c9gktnEqeUbjhtuB2yjwYv/UfEJouJSEnchMKYpwTQXAe4Xixa6neXQ==~3486773~4405060 for .tesla.com/>, <Cookie tesla-auth.sid=s%3AarDrMEgjr9U7ajsldIHGSyrfT1VYPhOM.EbBQKQy24%2BbtqnGFhGA9um2eDDR%2F9Ooux3loRDg0of4 for auth.tesla.com/>]>
2021-09-04 19:48:26 DEBUG (MainThread) [authcaptureproxy.helper] POST:
https://auth.tesla.com/VWl_M/DC/RL/vaO3/5yqzowz/ti5uk00p3r/SFwXZkc/QUELIm/ZyEms with
{"host": "auth.tesla.com", "accept": "*/*", "accept-encoding": "gzip, deflate, br", "connection": "keep-alive", "user-agent": "python-httpx/0.19.0", "content-type": "text/plain;charset=UTF-8", "referer": "https://auth.tesla.com/oauth2/v3/authorize?client_id=ownerapi&code_challenge=NDdjYzY1ZTVkYTQyMDJkODljOWJjMjMyMmMwNmI0OGFkYWVjNDkxM2E1OTQxYzliNDQ2YjQzYTY1ZWU5NzA2OQ%3D%3D&code_challenge_method=S256&redirect_uri=https://auth.tesla.com/void/callback&response_type=code&scope=openid+email+offline_access&state=F5VXP2OgN4Ez4CqNEsZ16FMTtL7BYnMaJifZEZdBpVE_XsW_aQjtzyWCl3XLY-igxJ2xwzISIcrjCgV7P9iGrA", "accept-language": "en-us", "x-tesla-user-agent": "TeslaApp/3.10.9-433/adff2e065/android/10", "x-requested-with": "com.teslamotors.tesla", "cookie": {"_abck": "F7596CF8A824099CB6D526AC660394D2~-1~YAAQ0nRZaKhRyZ17AQAA9gLtsQZLGr2VdHT3nHrFAZe9tOn1pHmXYuPOAsSYaMN+bKN8UvXy4HjDTdNp/iQXva4Tq0aL8HUT93Q4Aw4pFr48YS/HvOaMB74iPJdl6qkOa8wPMxM25Ul/T0/9GX6GqWgsCUSSoUYztPOsberIj58Cj5eGMKAxKZAZXTUcWKNFHyOzNgkR6bzQxn63T2a2UtElAOGm+bcIy3r5f53I5bpmjeb9qbj1MnMuQwfqwQCQ4SSBMGE1BbSVnFjr7tgIp+ymyNb4SRC09U4jfya8BBLoOThH7+ANARnbXd3gNSy9J3Jjn4DMxGrGP74x86tXtH/PK0AatRnc+QaeoNXi9go9UWxkPY3xyge0W//fD0b+6ET/QZ8ErbxWlg==~-1~-1~-1", "ak_bmsc": "86D6AA52AA22E3528A4E7BFCFDAE87F5~000000000000000000000000000000~YAAQ0nRZaIJRyZ17AQAApv/ssQ2fQnUh5UB7b03KViDtLWMNQbTZ6CJrHGX0R6Q0DDYVQM3mUyzBw9tQVlrnubgKXskheZZnMZ8/wXVgEO4XDswHTloX6KXWvpKyHtWG7Pypp4rhZZM4I05xJR2/swDU8NnjfD/15pFoNjs7epWNK3jadYhslcorUH1VqPhXFTJBT5XSMazYx53SIEmtLOnoDXWO4baA4dP8522B/SAY3VfLuLuVnVDSevV7q8V4ATNcRT4iqBArQPPtNDCc0ycTQBjbhkvcHaDxkCq2hgKt1tk4N+wV/xhReTGxMV0WjKkSwmx7kevNNDnEsOr1j8DQr2fE3uJiqVeEdGJQ6L4tIm5cE39sqH7t", "bm_sz": "C034275AB655FEF9C8B9502642C0B967~YAAQ0nRZaINRyZ17AQAApv/ssQ20xVaSdef2MBbK/UZzR3Jy+VwkejzO/wXc6ZM4C2W7qIW2woUNL6ki96UJNBl0iVqGj09qenAxyiEI2t2u1g7blIPzAgxEmhryeBU//eJROqu1+AM5055Tv4sqyxuI41nNgRcq1M+wXrfKUJt8211vrD4Km0alZG9uzqeu5kNv4AuykI9p8dbVrLjwdUB60CqOOdV6T+/SqUjfpHNpPLgua4zeVN/c9gktnEqeUbjhtuB2yjwYv/UfEJouJSEnchMKYpwTQXAe4Xixa6neXQ==~3486773~4405060", "tesla-auth.sid": "s%3AarDrMEgjr9U7ajsldIHGSyrfT1VYPhOM.EbBQKQy24%2BbtqnGFhGA9um2eDDR%2F9Ooux3loRDg0of4"}, "content-length": "1523"}
returned 201:Created with response Headers({'content-length': '22', 'access-control-allow-headers': 'Content-Type,Authorization', 'access-control-allow-origin': '*', 'date': 'Sat, 04 Sep 2021 17:48:26 GMT', 'connection': 'keep-alive', 'content-type': 'application/json', 'origin_hostname': 'auth.tesla.com', 'originip': '127.0.0.1', 'permissions-policy': 'interest-cohort=()'})
2021-09-04 19:48:26 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Refreshed 1 tests: ['test_url']
2021-09-04 19:48:26 DEBUG (MainThread) [authcaptureproxy.helper] Running coroutine test_url
2021-09-04 19:48:26 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Passing through ZyEms as application/json

I have a reverse proxy for Home Assistant, it seems to whitelist its IP correctly

EDIT BY ADMIN: WORKAROUND: https://github.com/alandtse/tesla/issues/20#issuecomment-913810106. All credits to sillyfrog.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 5
  • Comments: 40 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Same here: Tried the workaround. Captcha appeared OK, but got this: 500 Internal Server Error Server got itself in trouble

Thanks. I’ve confirmed the workaround works from @sillyfrog . Here’s how you do it with less steps but potentially two browsers. You only need to use the auth.tesla.com redirect to get past the first step. It’s possible that if you get prompted by MFA or some other secondary page, the login will break but luckily the component remembers the state it’s in.

  1. On the computer accessing HA, modify the hosts file so auth.tesla.com points to your HA server. For example, if it’s at 192.168.1.3
192.168.1.3	auth.tesla.com
  1. Use that computer and access HA normally with your browser (BROWSER A). Add the custom integration. See the Recaptcha error.
  2. In a new browser window (BROWSER B), copy the url to the new browser window. Chrome may give security warnings and not allow you to change to http. If that happens, use something besides chrome.
  3. Edit the url so it starts with http://auth.tesla.com:8123 instead of your HA domain. https://hadomain.local/auth/tesla/proxy?config_flow_id=8e739ab41fdd4e76a380f173e5c02435&callback_url=https://hadomain.local/auth/tesla/callback?flow_id%3D8e739ab41fdd4e76a380f173e5c02435 -> http://auth.tesla.com:8123/auth/tesla/proxy?config_flow_id=8e739ab41fdd4e76a380f173e5c02435&callback_url=https://hadomain.local/auth/tesla/callback?flow_id%3D8e739ab41fdd4e76a380f173e5c02435
  4. With Browser B, complete the recaptcha and login.
  5. The component will either complete successfully, or it will timeout with the error below. image
  6. If you see this error, switch back to BROWSER A, which should still have the original login url, and refresh the page. It should take you to the next page in the login. Complete like normal.
  7. Revert your hosts file.

My current solution is… involved… Using this code and some network trickery:

I’m running HA in a docker container, and I have the SSH server enabled on my computer (a MacOS). From within the docker container I run the command:

ssh <computer username>@<computer IP> -R 8123:localhost:8123

Then, I have updated my /etc/hosts file, and added the line:

127.0.0.1	auth.tesla.com

I then go to my browser on my computer, and navigate to http://auth.tesla.com:8123/ - if everything is working, it’ll give you your HA login screen, login, and start the process to add this custom integration. I found on the the popup page that it used my default URL, update just the protocol/domain/port portion (ie: change the start to http://auth.tesla.com:8123 ), then you can login to the Tesla page as you would normally.

When things start working in HA, remove the line you added to your /etc/hosts and log out of the docker container.

There maybe better solutions - but this is the only one I can think of without hacking / running JavaScript in Python (or something similar).

Right

That’s really a question for Tesla. So long as they accept your refresh token, then it will keep getting new access tokens. If they invalidate your refresh token, then you have to get a new one.

Seems to work. Thanks for your efforts!

500 Internal Server Error

Waiting a soluttion. Thanks