Tesla integration not working

Hi, I am entering either OWNER API ACCESS TOKER or SSD REFRESH TOKEN

but get invalid token … ?

Only the refresh token works. It is a very long string. How did you enter it? Copy and paste is the only way to go. If you didn’t, you probably made a mistake.

The HACs custom integration is working for me. It took using an Tesla Authentication app to supply a token.

I am trying to setup the custom Tesla integration, but I keep getting the “Invalid Authentication” error message even if I provide my email and copy-pasted refresh token. Did anyone had that issue?

Error copying token? Wrong token? The refresh token looks to be about 1500 characters long. Where did you get it? If (like me) you got it from a phone app but enter it on a computer, it’s a bit tricky to transfer correctly. How exactly did you do this? What did you use to get a token? Have you tried refreshing?

1 Like

I did the copy from the Authenticator and paste to the Tesla authentication entirely on my phone.

I used Tesla Tokens (mobile app) as recommended. Copy & pasted it in an email (or in a Google Doc).
Used my email Tesla login + the refresh token (I also tried w the API access token). Do you see any potential of error?

And yes, I tried to refresh the token.

I used the “Auth for Tesla” app, then used the built-in copy and subsequent paste authenticate from HA on my phone. No email or document in the middle.

It’s likely that by pasting into a Google doc or email that some formatting (likely <cr>/<lf>) was added to each line. Use a tool that shows formatting (like Notepad++ on Windows). You should see a ~1500 character unbroken string with out [<cr><lf>]

I accessed my Home Assistant and tried to config the custom Tesla Integration directly on the phone to be able to copy-paste directly the token but with no success.

If you try to log out and re-login the integration, are you getting any error?

Logging out is too risky. What app did you use to get the token? How did you copy it (this was not obvious to me when I did it). What exactly is the error message when the Tesla login fails?
Note that the best place to post questions about this is here:

1 Like

Thanks for helping me/us out. That’s much appreciated.

So here’s what I am doing:

Based on what [Klagio] reported above, namely that an incorrect token gave a “invalid token” response, not an “invalid authentication” response, maybe your token is OK. Can you log out/in via the regular Tesla app on your phone? When you paste the token and scroll sideways do you see a very long input string?

Other than that, I’m out of ideas. Have you tried the discussion link above?

I’m having the same problem as @LyneMartel.
Configuration->Integrations is still reporting that it has discovered “Tesla” – just plain Tesla, not Tesla Custom Configuration. I’m on HA 2021.9.7.
I can still access Tesla Custom Integration by way of Configuration->Integration->Add Integration (that’s how I get to the above error w/re Refresh Token). FYI - It does not auto-discover Tesla Customer Integration.
Is there a chance the two Tesla Integrations are interfering with each other??

This is unfortunately the issue. The Tesla component in core has a hard requirement on teslajsonpy 0.18.3, whilst the custom component requires 0.20.0, where the support for refresh token were added.

You need to scrub HA of the core Tesla integration and re-enable the custom one in order to make this work. If this doesn’t help just wait for the October release of HA where Tesla is gone and retry.

1 Like

Did you install the custom component as described here?

Thanks for the support and ideas!

@leeelson: Yes, I followed the custom integration instructions (several times…). In my case I installed via HACS, so then skipped to Step 7 (restart).

@omelhus: Given that the October release is only 2-3 days away, I may just wait, but I’m curious how to scrub HA of the core Tesla integration? I executed find . -name "*tesla*" -print but find only references to the custom component. How would I do the scrub you suggested?

any luck? I am stuck in the exact same situation using HA Supervisor. Do we wait for the Tesla integration to go away or did you find a solution? Thanks!

Have you read and tried items here?

1 Like

and here we are again, also custom integration stopped working with new version?