Open timmchugh11 opened 3 years ago
There was a change of Key on the Renault servers. There is a discussion about it on https://github.com/hacf-fr/renault-api/issues/181, with corresponding pull request https://github.com/hacf-fr/renault-api/pull/182
Thank you, I just used the new key and all is working again
The key I used from the link you sent, Ae9FDWugRxZQAGm3Sxgk7uJn6Q4CGEA2
Hmm, I got it working again with the new key, but it seems to have broken again?
Error message seems to be slightly different though. When using the new key (mentioned above), I get this error:
{"type":"FUNCTIONAL","messages":[{"code":"err.func.wired.unauthorized","message":"The access is unauthorized"}],"errors":[{"errorCode":"err.func.wired.unauthorized","errorMessage":"The access is unauthorized"}],"error_reference":"FUNCTIONAL"}
While when I use a different/incorrect key, I get this error:
{"error":"access_denied","error_description":"Unauthorized"}
Any ideas? The My Renault app on my phone still functions correctly...
Problem maybe related to https://github.com/jamesremuscat/pyze/issues/78?
Note: https://github.com/hacf-fr/renault-api still works, but in my case the data hasn't changed since 2021-02-07T12:17:58+01:00 and no longer reflects the reality.
Ok, I found the problem in EVCC code. Was not a problem on Renaults side... So API (with updated Kamereon key) still works fine here. After vehicle wakeup the data was updated correctly.
Yes, it seems to be some faulty Gigya integrations out there.
Ok, I found the problem in EVCC code. Was not a problem on Renaults side... So API (with updated Kamereon key) still works fine here. After vehicle wakeup the data was updated correctly.
Yes, it seems to be some faulty Gigya integrations out there.
Starting with today 12:00 CET gigya changed (or never accepted) some parameter-names. See (sorry german) https://github.com/fungus75/ioBroker.zoe2/issues/17 or have a look at the implementation of the gigya-part here: https://github.com/hacf-fr/renault-api/issues
Please find here which parameter I had to adjust: https://github.com/fungus75/ioBroker.zoe2/commit/c787fda42de51d7f7df4a087706ed1a67e55cd9c
And calling account.getAccount is unnecessary, it's enough with accounts.login and accounts.getJWT. You get the needed gigyaPersonID already on login.
And it was not the case for pyze either, there are other scripts, apps and so on with faulty Gigya integration.
So what's the fix to have pyze
working again? Obviously some people digged into the problem.
In the Gigya calls (getAccountInfo and getJWT), the parameter "oauth_token" should be changed to "login_token".
So what's the fix to have
pyze
working again? Obviously some people digged into the problem.
@kozmoz you don't describe your problem so it might not be linked to this discussion
In the Gigya calls (getAccountInfo and getJWT), the parameter "oauth_token" should be changed to "login_token".
@yannickh it is already the case in pyze since #79 was merged last year
So what's the fix to have
pyze
working again? Obviously some people digged into the problem.@kozmoz you don't describe your problem so it might not be linked to this discussion
Exactly the same error as @timmchugh11 who started this issue.
Error communicating with Renault API!
{"error":"access_denied","error_description":"Unauthorized"}
You need to update the Kamereon API key!!!
Alright. Missed the new key for Kamereon, but did update the Gigya API key. In summary, this fixed my issue:
export KAMEREON_API_KEY="Ae9FDWugRxZQAGm3Sxgk7uJn6Q4CGEA2"
export GIGYA_API_KEY="3_e8d4g4SE_Fo8ahyHwwP7ohLGZ79HKNN2T8NjQqoNnk6Epj6ilyYwKdHUyCw3wuxz"
I'm still facing issues:
Traceback (most recent call last):
File "/opt/bin/pyze", line 8, in <module>
sys.exit(main())
File "/volume1/Share/Web/SmartHome/.local/lib/python3.8/site-packages/pyze/cli/__main__.py", line 69, in main
parsed_args.func(parsed_args)
File "/volume1/Share/Web/SmartHome/.local/lib/python3.8/site-packages/pyze/cli/status.py", line 35, in run
v = get_vehicle(parsed_args)
File "/volume1/Share/Web/SmartHome/.local/lib/python3.8/site-packages/pyze/cli/common.py", line 24, in get_vehicle
vehicles = k.get_vehicles().get('vehicleLinks')
File "/volume1/Share/Web/SmartHome/.local/lib/python3.8/site-packages/pyze/api/credentials.py", line 26, in inner
return func(*args, **kwargs)
File "/volume1/Share/Web/SmartHome/.local/lib/python3.8/site-packages/pyze/api/kamereon.py", line 114, in get_vehicles
self.get_account_id(),
File "/volume1/Share/Web/SmartHome/.local/lib/python3.8/site-packages/pyze/api/kamereon.py", line 73, in get_account_id
accounts = self.get_accounts()
File "/volume1/Share/Web/SmartHome/.local/lib/python3.8/site-packages/pyze/api/credentials.py", line 25, in inner
raise MissingCredentialException(name)
pyze.api.credentials.MissingCredentialException: gigya-person-id
any ideas?
Same here;
pi@TestPi:~/pyze$ pyze status --km
Traceback (most recent call last):
File "/usr/local/bin/pyze", line 11, in
Used the mentioned api keys from above and from keys mentioned in the readme files
Are you using the correct Gigya API keys for your country? These are different for each country. Only the Kamereon API key is static for all countries.
I used the GB version before, but even with nl_NL no change...
Hi, i had the same issue and now it workes with the keys of kozmos. Then i played a bit with the keys. Here are my results: the Gigya-key is not so strikt, for me also the english and the german version worked: English
"gigyaProd": {
"target": "https://accounts.eu1.gigya.com",
"apikey": "3_e8d4g4SE_Fo8ahyHwwP7ohLGZ79HKNN2T8NjQqoNnk6Epj6ilyYwKdHUyCw3wuxz"
German
"gigyaProd": {
"target": "https://accounts.eu1.gigya.com",
"apikey": "3_7PLksOyBRkHv126x5WhHb-5pqC1qFR8pQjxSeLB6nhAnPERTUlwnYoznHSxwX668"
but the Kamereon Key is bitchy: neither the german nor the english version was successfull. Here i got the error message:
"Error communicating with Renault API! {"error":"access_denied","error_description":"Unauthorized"}"
Only the Kammereon key of kozmos worked. So a question to him: how did you get this key?
Key retrieval has changed on the Renault side. It is now hidden deep inside Firebase, and for now you need to use Fiddler to extract it.
There is a discussion on https://github.com/hacf-fr/renault-api/pull/184
@Podariss, @brusch: maybe it helps to delete first the lokal file .credentials/pyze.json before starting again with pyze login?
Only the Kammereon key of kozmos worked. So a question to him: how did you get this key?
In the third message of this thread. Initially I also missed that one, but later I realised that was the fix for access_denied.
https://github.com/jamesremuscat/pyze/issues/95#issuecomment-772813562
Same Problem here:
Traceback (most recent call last): File "/usr/local/bin/pyze", line 11, in <module> load_entry_point('PyZE==0.5.0', 'console_scripts', 'pyze')() File "/usr/local/lib/python3.7/dist-packages/PyZE-0.5.0-py3.7.egg/pyze/cli/__main__.py", line 69, in main File "/usr/local/lib/python3.7/dist-packages/PyZE-0.5.0-py3.7.egg/pyze/cli/status.py", line 35, in run File "/usr/local/lib/python3.7/dist-packages/PyZE-0.5.0-py3.7.egg/pyze/cli/common.py", line 24, in get_vehicle File "/usr/local/lib/python3.7/dist-packages/PyZE-0.5.0-py3.7.egg/pyze/api/credentials.py", line 25, in inner pyze.api.credentials.MissingCredentialException: kamereon-api-key
@Heckmic: Did you use exactly the following KEY? Only this one worked for me. export KAMEREON_API_KEY="Ae9FDWugRxZQAGm3Sxgk7uJn6Q4CGEA2"
And of course you have to login again: pyze login
I am using the updated key Ae9FDWugRxZQAGm3Sxgk7uJn6Q4CGEA2 , but I am still getting this error:
{"type":"FUNCTIONAL","messages":[{"code":"err.func.wired.unauthorized","message":"The access is unauthorized"}],"errors":[{"errorCode":"err.func.wired.unauthorized","errorMessage":"The access is unauthorized"}],"error_reference":"FUNCTIONAL"}
I am using both direct url call and GET/POST using a Rest API Chrome extension, no luck.
I also know that there is a direct link which gives a very long JSON response, containing a lot of data, including my VIN.... but I found it by chance after dozens of attempts and I cannot get it anymore, any idea how it could be formed?
Are you using pyze? If not maybe you could download this library and look in the code how the web-service or link is formed. For pyze it is essential to delete first the file .credentials/pyze.json and then login again with "pyze login" to avoid old chaching.
Indeed I am reverse-engineering pyze and other scripts to figure out which are the direct calls to perform, to implement them in Javascript, but I am stuck at Kamereon authentication (Gigya part is fine).
Have a look at that: https://github.com/fungus75/ioBroker.zoe2/blob/master/main.js Rewritten pyze (and some more projects) in Javascript for usage within iobroker. Maybe it helps?
This is what I discovered till now:
Download api keys GIGYA_KEY and KAMEREON_KEY:
Download Gigya session cookie (cookieValue):
https://accounts.eu1.gigya.com/accounts.login?loginID=MAIL&password=PASSWORD&apikey=GIGYA_KEY
Download Kamereon Person Id (PersonId):
https://accounts.eu1.gigya.com/accounts.getAccountInfo?apikey=GIGYA_KEY&login_token=COOKIEVALUE
Download Gigya JWT token (Id_token):
https://accounts.eu1.gigya.com/accounts.getJWT?apikey=GIGYA_KEY&login_token=COOKIEVALUE
Then query Kamereon server in some way which I don't understand yet...
To get the account(s) associated to a personId:
https://api-wired-prod-1-euw1.wrd-aws.com/commerce/v1/persons/PERSONID?country=IT
To get vehicles associated to an account:
LoginID and password for GIGYA is My renault app login? When trying to do the Download Kamereon Person Id (PersonId) i get this error. { "errorDetails": "Unauthorized user", "errorMessage": "Unauthorized user", "apiVersion": 2, "statusCode": 403, "statusReason": "Forbidden", "time": "2023-04-22T06:40:45.003Z" }
I think the APi key has just changed again, breaking all the custom apps.
This should be the new kamereon api key:
YjkKtHmGfaceeuExUDKGxrLZGGvtVS0J
Source: https://gist.github.com/mountbatt/772e4512089802a2aa2622058dd1ded7
Hello,
About 2 days ago my connection stopped working and I get the error,
Error communicating with Renault API! {"error":"access_denied","error_description":"Unauthorized"}
Is this an issue with pyze? I have tried re adding my credentials and I get the same error when logging in.
I am still able to use the Renault app and the data is up to date, so I don't think it is my account.
Thanks