question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Retrying setup: API token request returned with status code 401

See original GitHub issue

Describe the bug Seams the legacy API is no longer handled correct

Latest working release Current

Debug logs 2022-03-09 13:30:32 DEBUG (MainThread) [skodaconnect.connection] Get authorization page: "https://identity.vwgroup.io/oidc/v1/authorize" 2022-03-09 13:30:32 DEBUG (MainThread) [skodaconnect.connection] Got authorization endpoint: "https://identity.vwgroup.io/signin-service/v1/signin/f9a2359a-b776-46d9-bd0c-db1904343117@apps_vw-dilab_com?relayState=22c4463fea047d890e1c4abaf120c4af17fa0d3d" 2022-03-09 13:30:32 DEBUG (MainThread) [skodaconnect.connection] Got redirect to signin-service 2022-03-09 13:30:32 DEBUG (MainThread) [skodaconnect.connection] Extracted form attribute: ('_csrf', 'c4aa16a4-85c6-45f3-8890-d203cc1868f3') 2022-03-09 13:30:32 DEBUG (MainThread) [skodaconnect.connection] Extracted form attribute: ('relayState', '22c4463fea047d890e1c4abaf120c4af17fa0d3d') 2022-03-09 13:30:32 DEBUG (MainThread) [skodaconnect.connection] Extracted form attribute: ('hmac', '5dea80011d1512b9b134065f07815cb174480a018baee5c93257653ba1fdc8f1') 2022-03-09 13:30:32 DEBUG (MainThread) [skodaconnect.connection] Start authorization for user zieglert@gmx.ch 2022-03-09 13:30:33 DEBUG (MainThread) [skodaconnect.connection] Found dynamic credentials form, extracting attributes 2022-03-09 13:30:33 DEBUG (MainThread) [skodaconnect.connection] JSON: {'clientLegalEntityModel': {'clientId': 'f9a2359a-b776-46d9-bd0c-db1904343117@apps_vw-dilab_com', 'clientAppName': 'ŠKODA App & Portal', 'clientAppDisplayName': 'ŠKODA App & Portal', 'legalEntityInfo': {'name': 'ŠKODA', 'shortName': 'SKODA', 'productName': 'ŠKODA ID', 'theme': 'skoda', 'defaultLanguage': 'cs', 'termAndConditionsType': 'DEFAULT', 'legalProperties': {'revokeDataContact': 'DPOffice@skoda-auto.cz', 'imprintText': 'IMPRINT', 'countryOfJurisdiction': 'CZ'}}, 'imprintTextKey': 'imprint.link.text'}, 'template': 'loginAuthenticate', 'hmac': '4cc7c4e338c4a83bd669b45547528a6b95ff960867e6a5caa5d54f1285bde085', 'useClientRendering': True, 'emailPasswordForm': {'email': 'email@domain.com', 'password': None}, 'error': None, 'relayState': '22c4463fea047d890e1c4abaf120c4af17fa0d3d', 'nextButtonDisabled': False, 'enableNextButtonAfterSeconds': 0, 'postAction': 'login/authenticate', 'identifierUrl': 'login/identifier'} 2022-03-09 13:30:33 DEBUG (MainThread) [skodaconnect.connection] Finalizing login 2022-03-09 13:30:33 DEBUG (MainThread) [skodaconnect.connection] Using login action url: "https://identity.vwgroup.io/signin-service/v1/f9a2359a-b776-46d9-bd0c-db1904343117@apps_vw-dilab_com/login/authenticate" 2022-03-09 13:30:33 DEBUG (MainThread) [skodaconnect.connection] Following redirect to "https://identity.vwgroup.io/oidc/v1/oauth/sso?clientId=f9a2359a-b776-46d9-bd0c-db1904343117@apps_vw-dilab_com&relayState=22c4463fea047d890e1c4abaf120c4af17fa0d3d&userId=8c9a2806-bc44-4575-93e8-b552d4b26829&HMAC=b0a3d71c7d4ff578dc227db67e5a7300e55891656a0cfe6201acf9c4f30bd418" 2022-03-09 13:30:33 DEBUG (MainThread) [skodaconnect.connection] Following redirect to "https://identity.vwgroup.io/signin-service/v1/consent/users/8c9a2806-bc44-4575-93e8-b552d4b26829/f9a2359a-b776-46d9-bd0c-db1904343117@apps_vw-dilab_com?scopes=openid%20mbb%20profile&relayState=22c4463fea047d890e1c4abaf120c4af17fa0d3d&callback=https://identity.vwgroup.io/oidc/v1/oauth/client/callback&hmac=09397ca690d32ad197173f6084530e20b2716241c4780d2559defd7ae26ca64d" 2022-03-09 13:30:33 DEBUG (MainThread) [skodaconnect.connection] Following redirect to "https://identity.vwgroup.io/oidc/v1/oauth/client/callback/success?user_id=8c9a2806-bc44-4575-93e8-b552d4b26829&client_id=f9a2359a-b776-46d9-bd0c-db1904343117@apps_vw-dilab_com&scopes=openid%20mbb%20profile&consentedScopes=openid%20mbb%20profile&relayState=22c4463fea047d890e1c4abaf120c4af17fa0d3d&hmac=6cae527634c7c8c8c0278a1f57cd749f2f23ab6e4522cf3be339914fdba4a90c" 2022-03-09 13:30:33 DEBUG (MainThread) [skodaconnect.connection] Received authorization code, exchange for tokens. 2022-03-09 13:30:34 DEBUG (MainThread) [skodaconnect.connection] Got access_token for client f9a2359a-b776-46d9-bd0c-db1904343117@apps_vw-dilab_com, token: "ACCESS_TOKEN" 2022-03-09 13:30:34 DEBUG (MainThread) [skodaconnect.connection] Got refresh_token for client f9a2359a-b776-46d9-bd0c-db1904343117@apps_vw-dilab_com, token: "REFRESH_TOKEN" 2022-03-09 13:30:34 DEBUG (MainThread) [skodaconnect.connection] Got id_token for client f9a2359a-b776-46d9-bd0c-db1904343117@apps_vw-dilab_com, token: "ID_TOKEN" 2022-03-09 13:30:34 DEBUG (MainThread) [skodaconnect.connection] Verifying token for f9a2359a-b776-46d9-bd0c-db1904343117@apps_vw-dilab_com 2022-03-09 13:30:34 DEBUG (MainThread) [skodaconnect.connection] Matching f9a2359a-b776-46d9-bd0c-db1904343117@apps_vw-dilab_com against 7f045eee-7003-4379-9968-9355ed2adb06@apps_vw-dilab_com 2022-03-09 13:30:34 DEBUG (MainThread) [skodaconnect.connection] Matching f9a2359a-b776-46d9-bd0c-db1904343117@apps_vw-dilab_com against f9a2359a-b776-46d9-bd0c-db1904343117@apps_vw-dilab_com 2022-03-09 13:30:34 DEBUG (MainThread) [skodaconnect.connection] Token for skoda verified OK. 2022-03-09 13:30:34 DEBUG (MainThread) [skodaconnect.connection] Client "connect" token is missing, call to authorize the client. 2022-03-09 13:30:34 DEBUG (MainThread) [skodaconnect.connection] Starting authorization process for client connect 2022-03-09 13:30:34 DEBUG (MainThread) [skodaconnect.connection] Get authorization page: "https://identity.vwgroup.io/oidc/v1/authorize" 2022-03-09 13:30:34 DEBUG (MainThread) [skodaconnect.connection] Got authorization endpoint: "https://identity.vwgroup.io/oidc/v1/oauth/sso?clientId=7f045eee-7003-4379-9968-9355ed2adb06@apps_vw-dilab_com&userId=8c9a2806-bc44-4575-93e8-b552d4b26829&relayState=e0a8b687a5908b7777c00edd48af57f27dab1b65&HMAC=41f78fe2734c44f3953f95b535a644150638ca8d6ce385b6437acafd69ece5fa" 2022-03-09 13:30:34 DEBUG (MainThread) [skodaconnect.connection] Following redirect to "https://identity.vwgroup.io/signin-service/v1/consent/users/8c9a2806-bc44-4575-93e8-b552d4b26829/7f045eee-7003-4379-9968-9355ed2adb06@apps_vw-dilab_com?scopes=openid%20profile%20address%20cars%20email%20birthdate%20badge%20mbb%20phone%20driversLicense%20dealers%20profession%20vin&relayState=e0a8b687a5908b7777c00edd48af57f27dab1b65&callback=https://identity.vwgroup.io/oidc/v1/oauth/client/callback&hmac=97cbbd821c008fac10cb1aebce10f5667ef9dc2c8b29a46d09e50d4ab78693c8" 2022-03-09 13:30:34 DEBUG (MainThread) [skodaconnect.connection] Following redirect to "https://identity.vwgroup.io/oidc/v1/oauth/client/callback/success?user_id=8c9a2806-bc44-4575-93e8-b552d4b26829&client_id=7f045eee-7003-4379-9968-9355ed2adb06@apps_vw-dilab_com&scopes=openid%20profile%20address%20cars%20email%20birthdate%20badge%20mbb%20phone%20driversLicense%20dealers%20profession%20vin&consentedScopes=openid%20profile%20address%20cars%20email%20birthdate%20badge%20mbb%20phone%20driversLicense%20dealers%20profession%20vin&relayState=e0a8b687a5908b7777c00edd48af57f27dab1b65&hmac=50c31240d9cfad864fcb37488795670a142b5ffa7ccc281fbaade5a1a5fff08d" 2022-03-09 13:30:34 DEBUG (MainThread) [skodaconnect.connection] Received authorization code, exchange for tokens. 2022-03-09 13:30:34 DEBUG (MainThread) [skodaconnect.connection] Got access_token for client 7f045eee-7003-4379-9968-9355ed2adb06@apps_vw-dilab_com, token: "ACCESS_TOKEN" 2022-03-09 13:30:34 DEBUG (MainThread) [skodaconnect.connection] Got refresh_token for client 7f045eee-7003-4379-9968-9355ed2adb06@apps_vw-dilab_com, token: "REFRESH_TOKKEN" 2022-03-09 13:30:34 DEBUG (MainThread) [skodaconnect.connection] Got id_token for client 7f045eee-7003-4379-9968-9355ed2adb06@apps_vw-dilab_com, token: "ID_TOKEN" 2022-03-09 13:30:34 DEBUG (MainThread) [skodaconnect.connection] Verifying token for 7f045eee-7003-4379-9968-9355ed2adb06@apps_vw-dilab_com 2022-03-09 13:30:34 DEBUG (MainThread) [skodaconnect.connection] Matching 7f045eee-7003-4379-9968-9355ed2adb06@apps_vw-dilab_com against 7f045eee-7003-4379-9968-9355ed2adb06@apps_vw-dilab_com 2022-03-09 13:30:34 DEBUG (MainThread) [skodaconnect.connection] Token for connect verified OK. 2022-03-09 13:30:34 DEBUG (MainThread) [skodaconnect.connection] HTTP POST "https://profileintegrityservice.apps.emea.vwapps.io/iaa/pic/v1/users/8c9a2806-bc44-4575-93e8-b552d4b26829/check-profile" 2022-03-09 13:30:35 DEBUG (MainThread) [skodaconnect.connection] Request for "https://profileintegrityservice.apps.emea.vwapps.io/iaa/pic/v1/users/user/check-profile" returned with status code [200], response: {'scopeId': 'commonMandatoryFields', 'ssoId': 'SSOID', 'missingMandatoryFields': [], 'mbbUserId': 'UserID', 'mbbIdStatus': True, 'mandatoryFieldsStatus': True, 'spinStatus': True, 'mandatoryConsentInfo': [{'id': 'termsOfUse', 'status': 'VALID'}]} 2022-03-09 13:30:35 DEBUG (MainThread) [skodaconnect.connection] Consent returned {'consentInfo': {'scopeId': 'commonMandatoryFields', 'ssoId': '8c9a2806-bc44-4575-93e8-b552d4b26829', 'missingMandatoryFields': [], 'mbbUserId': 'UserID', 'mbbIdStatus': True, 'mandatoryFieldsStatus': True, 'spinStatus': True, 'mandatoryConsentInfo': [{'id': 'termsOfUse', 'status': 'VALID'}]}} 2022-03-09 13:30:35 DEBUG (MainThread) [skodaconnect.connection] User consent is valid, no missing information for profile 2022-03-09 13:30:35 DEBUG (MainThread) [skodaconnect.connection] HTTP GET "https://api.connect.skoda-auto.cz/api/v2/garage/vehicles" 2022-03-09 13:30:36 DEBUG (MainThread) [skodaconnect.connection] Request for "https://api.connect.skoda-auto.cz/api/v2/garage/vehicles" returned with status code [200], response: [] 2022-03-09 13:30:36 DEBUG (MainThread) [skodaconnect.connection] Skoda native API returned no vehicles. Using fallback VW-Group API. 2022-03-09 13:30:36 DEBUG (MainThread) [skodaconnect.connection] Client "vwg" token is missing, call to authorize the client. 2022-03-09 13:30:36 DEBUG (MainThread) [skodaconnect.connection] Trying to fetch api tokens. 2022-03-09 13:30:37 DEBUG (MainThread) [skodaconnect.connection] API token request failed. 2022-03-09 13:30:37 WARNING (MainThread) [homeassistant.config_entries] Config entry 'VIN' for skodaconnect integration not ready yet: API token request returned with status code 401; Retrying in background

Installation:

  • Home Assistant variant: Supervised
  • Python version 3.8

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
zauberertycommented, Apr 6, 2022

Could resolve the issue by recreating the account

0reactions
zauberertycommented, Mar 31, 2022

I’ll try

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Quickly Fix the 401 Unauthorized Error (5 Methods)
The 401 (Unauthorized) status code indicates that the request has not been applied because it lacks valid authentication credentials for the ...
Read more >
401 Unauthorized Error: What It Is and How to Fix It
The 401 Unauthorized Error is an HTTP response status code indicating that the client could not authenticate a request.
Read more >
401 Error: 5 Ways to Troubleshoot and Fix It - Hostinger
The 401 Unauthorized error is triggered by unauthenticated requests made to a WordPress web server. Learn how to identify and fix the issue....
Read more >
'401 Unauthorized HTTP' for REST API token that expires in ...
Error : '401 Unauthorized HTTP' for REST API token that expires in less than 60 minutes. For the Fuel/REST API, access tokens expire...
Read more >
401 Unauthorized - HTTP - MDN Web Docs
The HyperText Transfer Protocol (HTTP) 401 Unauthorized response status code indicates that the client request has not been completed ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found