tesla
tesla copied to clipboard
Error: Need oauth credentials
I updated to the latest version of the custom integration, generated the SSO keys using the "Tesla Tokens" app. When I type in my email address and paste the SSO key I get the following error:
Logger: custom_components.tesla_custom.config_flow Source: custom_components/tesla_custom/config_flow.py:167 Integration: Tesla Custom Integration (documentation, issues) First occurred: 6:13:13 PM (9 occurrences) Last logged: 7:42:54 PM
Authentication error: Need oauth credentials
I also tried using the API token as the email address just in case (but it didn't work either).
The error indicates the token is invalid. Are you providing the SSO Refresh Token.
It's the bottom item in Tesla Tokens.
Can you verify the version of teslajsonpy on your system? It has to be 0.20 for this to work, and this error message is what you’ll get if you still have 0.18.3 installed.
You can see the version in the python site-packages folder.
Make sure the core Tesla component is removed, delete teslajsonpy from site-packages and then reactivate the custom component.
I'm definitely using the SSO Refresh Token. I'm using the HA OS on a Raspberry Pi 4. I can't seem to figure out how to view the contents of the site-packages directory or the location of teslajsonpy to view/update the file (remotely). I haven't tried using the console yet though.
Googling wasn't much help sorry.
First you can try logging onto the console and run
sudo -H pip install teslajsonpy -U
If that doesn’t help you can navigate to /usr/local/lib/python3.9/site-packages/ and remove the folders starting with teslajsonpy, restart and re-activate the component.
I have the same issue and I try reinstalling teslajsonpy but it also doesn’t work…..
Please verify the version of teslajsonpy and alternatively try the second option from my above post.
This issue should disappear with the release of the next version of HA where the Tesla component is removed.
Sorry, but myself also
2021-09-12 23:36:51 ERROR (MainThread) [custom_components.tesla_custom.config_flow] Authentication error: Need oauth credentials
I used AuthAppForTesla on iOS and copied the refresh token. Tried the Home Assistant iPhone App and Emailing the token then using Chrome on Windows I am running Home Assistant Operating System on a RPI4 core-2021.9.6 supervisor-2021.09.0 Home Assistant OS 6.3 HACS 1.15.2 Tesla v1.0.0
Unfortunately, there's not much we can debug on this beyond checking your dependencies. Tesla either accepts your token or it doesn't. Please note it should be over 1000 characters long, mine is 1240.
Y’all need to try again when you’ve updated to HA without the Tesla component. Not sure when it’ll be released but it should be any day.
Thought I have the same issue. @alandtse last comment helped me. I extracted my token via TeslaPy and always took the wrong too short refresh token. Now it works.
I had the same issue.. Turns out I had to restart the HA instance twice before the old Tesla stuff would stop popping up & then the custom instance would work.
It might be helpful if people could post a screenshot of the correct field in each app. Obviously obfuscate your token before posting. I'll get one for Tesla Tokens but I don't have an iPhone.
EDIT:
And if you're using TeslaFi you can grab the "Refresh Token (NEW)" from your Tesla account settings there too.
I had the same issue, installing the Tesla_custom integration for the first time (car arrives on friday) and unable to authenticate. Pulled my refresh token via ios Auth app for Tesla, its 1224 characters long. However everytime i put it in with my email address it showed invalid authentication. However after a restart of HA, it now logs in. I do have other errors now as it says the integration failed to set up but not started looking into that one just yet!
I had the same issue.. Turns out I had to restart the HA instance twice before the old Tesla stuff would stop popping up & then the custom instance would work.
This worked for me as well!
the integration wont start now...says to check the logs. I dont have my Tesla till Friday and my Tesla account is not linked to my new car yet so dont know if thats the issue but i guess i wait till friday and wait to see. Will be frustrating to have the car but not be able to integrate it though. thanks
the integration wont start now...says to check the logs. I dont have my Tesla till Friday and my Tesla account is not linked to my new car yet so dont know if thats the issue but i guess i wait till friday and wait to see. Will be frustrating to have the car but not be able to integrate it though. thanks
Yes that's an issue. We don't test the integration against not having a vehicle linked to it. Until they hand it over, we have no idea what the state of the vehicle is and whether it'll reject your access attempts.
I made it work. Thank you for all your efforts
I used AuthAppForTesla on iOS and copied the refresh token. I placed the Token in an Apple note I could read on my PC and then used Chrome on Windows 10 to configure
I am running Home Assistant Operating System on a RPI4 core-2021.9.6 supervisor-2021.09.0 Home Assistant OS 6.4 HACS 1.15.2 Tesla v1.0.0
The only thing that has changed since it did not work earlier in the week are OS is now v6.4, there have been a couple of reboots and I did not use the HomeAssistant iPhone App or email to transfer the token.
Set up matches the user above exactly:
RPI4 core-2021.9.6 supervisor-2021.09.0 Home Assistant OS 6.4 HACS 1.15.2 Tesla v1.0.0
"Invalid authentication" on attempted login with valid authentication.
Same error, Refresh Token is directly from the Tesla website via Chrome. Also tried with the iOS App. Not too sure what this teslajsonpy thing is as it's not referenced anywhere in the documentation.
Thanks for helping!
Same error, Refresh Token is directly from the Tesla website via Chrome. Also tried with the iOS App. Not too sure what this teslajsonpy thing is as it's not referenced anywhere in the documentation.
Thanks for helping!
Use the apps as described. The token from the website is a different token (v1 vs v3) and cannot be used.
ok this is quite strange. Mine is working but in the spirit of testing...just deleted my integration. Installed the integration again and all working (but did restart the supervisor after the reload). Just to double check, we are talking about the Tesla Custom integration and not the standard Tesla one right...the standard one is not working for me either but have also read thats not been working for a while now.
The two integrations cannot be installed alongside each other because of conflicting dependencies. If you have the core Tesla integration activated you need to remove that, restart a couple of times and then install the custom component.
If that doesn’t help just hang on until the version of HA where Tesla is removed is released, upgrade, reinstall and it should all be good.
Just updated from 0.2.1 to 1.0.0, haven't used the builtin integration for a long time, and I'm having this issue too. Restarted 10 times and still won't work.
I had this issue too, but realized it was because I was using my phone to copy and paste the token into HA. I pasted my token into a new note on my phone, and on my computer, copied the token from the note and pasted it into HA, and it worked!
I believe this is the same issue I am having. I just updated from the .2 to 1.0 and now the integration says "Failed to set up: could not authenticate".
How do I re-enter my credentials/token?
Please wait for the October release of HA and upgrade to that before you add a “me too!”. The issue should be resolved as soon as Tesla is out of core.
OK, thanks! I'll do that. I'm just sad because I lost all access to the Tesla component :-(
Needs an HA instance restart and then it works. Choose the Refresh Token value! Thanks a bunch for working on this!!