Tuya Integration setup failure - Invalid authentication

I was having trouble too, what worked for me was signing up with mail (in the smartlife app) using a new email and a password with just numbers and letters, just to be sure. I had no problem using my country code, 31.

Wonderful suggestion. Worked like a charm. However, the settings looks modified in the app. I found the options under ME → FEATURED → MESSAGE NOTIFICATION, that prompted me to add the contact number.

2 Likes

where can I see this format of username?
my username is in email format.

Ok. A quick search didn’t show this answer (in these words) being here. Here’s what it was for me. I had a lot of help from other posts that got me thinking.

Short story, I had an account with the Tuya app AND the Smart Life app, both using the same email address. Different passwords. How that’s possible, I am unsure. But it seems there are 5 or 6 apps that are half connected through the authentication?

I removed my Smart Life account from the app itself and my Tuya account logged me in for the integration, easy peezy. (I never did learn how to spell that word…)

So if you are getting the invalid authentication message, make sure you don’t have an account on one of the other apps they have that do the exact same thing.

And now that I have that connected… the rest of the night is spent… CHEERS!

Well, snap. I saw this just after posting my fix… I had to download the Tuya app because the Smart Life app said it was too outdated to connect to the Tuya Zigbee 3 hub. Ok. Well. I am an IT professional and I’m used to obstacle after obstacle. And it is summer, so I don’t need the bedroom lights for a while…

To the search engine of my choice to find some answers…

same issue here. very frustrating

Tuya, Smart life and many other rebranded apps are using different account polls but having similar functionality/user experience. Tuya can give you a branded app which can be a selling point for brand. On the other hand, current tuya integration supports bunch of these brands, not all. So, if you have intention to use tuya integration, you can switch to tuya account. Last thing, some rebranded apps are giving additional functionality as iftt integration which was removed from tuya for couple of months, but now it is back.

This is what worked for me. It is probably necessary to have completely purely new account. I used Tuya app, not Smart Life.

That did it. To be specific: To get account number
Open App: Bottom right select me
Next screen: Top right select the settings cog wheel
Next screen: Select About
Next screen: Select Upload log and look for User Account on the pop up.
I got the account number which was of the format 1-1234567890 where 1 was the country code. So when providing login information during Tuya integration setup I provided the numbers 1234567890 as username and 1 as the country code and the password that works for the smartlife app. It then took a while saying that Tuya was rate limiting but eventually my devices appeared and I’m able to control it from HA. Thanks @delfer .

I had same error when intergrating HA with Tuya - what fixed for me was to registering my Tuya smart app in in Tuya IOT .
I had changed password and tried again region to no success.

THis worked for me
login to Tuya >cloud >Development> on the right side look for tab > Link my App - click on add and scan your barcode using your mobile app. After this is complete try intergation again with HA - the autenciation error was gone and was successfull .

I was having the same issue, it turned out to be a DNS problem.

I am using Tuya, registered via Smart Life and my DNS was blocking two domains that the Tuya integration needed (I am using DNSFilter as our DNS provider).

The two domains are tuyaus.com and tuyaeu.com, the latter looks like it would differ depending on what you set your “area code” to.

I whitelisted them and all is now working fine.

btw I am registered using a google email address, it doesn’t use google SSO so I think this may be a bit of a red herring.

Wow so many solutions. I tried like 5 from here and still nothing. This is so stupid.

2 Likes

Following the tips here I was able to get this working. Here is the method I used:

  • create Tuya account and Smart Life Account using email for username
  • (link the accounts via cloud project ?) - I did this step earlier so not sure if needed…
  • log in to Tuya account using a browser
  • click on the small icon at the top right → Account, and you should see Bound Information, with phone number unset
    • click the link next to phone. Receive the first confirmation code via email and enter it.
  • fill in the phone field and check SMS for the confirmation code sent to the phone. Enter the code received.
  • in HA you can now log in with the phone number (minus country code) as username, the normal password, and country code of the phone.

Note: it may be possible to log in with email and ‘86’ as country code, since that seemed tro be the default.

Just wanted to chime in with my 2 cents, i had everything working fine then one day it just quit on me and i couldn’t get back in invalid auth, turns out my clock was wrong and that threw it for a loop.

Bro. I just wasted 3 hours trying to get this fixed and you probably just saved me another 3.

Exactly the same issue for me. I just happened to change my timezone on the server yesterday and didn’t associate the two issues whatsoever.

Thanks my man.

Tuya v2 integration is a mess, I’ve spent 2 days now trying to get this to work. I tried every option in this thread(where I could… some aren’t available anymore)… still getting Invalid authentication… I stupidly deleted the older version of the integration, does anyone know how to get it back, doesn’t seem to be available anymore

  • List item

.

1 Like

UPDATE!! I just now created a NEW Cloud Project… linked my iphone app (instead of my android app because the iphone Smart Life app shows my user id as an email ) then I went to Home Assistant… Tuya 2 input my information BOOM!! went in first time I am happy

I see Upload on my Iphone… it shows the email address… BUT on my android app it does show the 1-(my cell phone number) I still cannot get Tuya 2 to work using either one i have now spend TWO full days and nothing… This Tuya 2 integration is CR@P!!

It might be not the best thread because I don’t have any problem with the authentication and the Smart Life app is linked and authenticated properly.

Home Assistant found two devices of 4, which I had before in the app (50% of efficiency, it could be better :stuck_out_tongue: ).

The thing is that I can only switch on lamps from the HA but I can turn them off. In Smart Life, it is no problem at all.
I have added the following APIs to the developer account:
Device Connection Service, Authorization, Smart Home Scene Linkage, IoT Data Analytics and Device Status Notification but there are missing those seen in the picture in step 6 like Smart Home Devices Management and Smart Home Family Management. Simple they are not in the available API set in the Tuya account.
How to add those and is this the reason that I can’t turn off my smart bulb?

Hi,
I had the same error, but I did a bunch of things I read here and something worked. Here’s what I did (I have a Synology NAS and HA is running on Virtual Server):

  • Registered a new account in Tuya app with a hotmail.com e-mail address and I set location to Taiwan (china) not my actual (Hungary)
  • Registered a new Tuya IoT account on the web page, set the location to Italy (I saw here that this country code worked for someone)
  • Made a new project as describet in the instructions
  • I updated HA Core and HA operation system to the newest (Core is 10.5 now)
  • I installed the Tuya v2 integration, gave the requested data (country code is 886 for Taiwan (from the Tuya home assistant wiki Correspondence table of regions and data centers page)

And it works (finally) :slight_smile:

Same problem with Tuya V2 from HACS.
I solve with Tuya oficial integration. Pay attention: acoount and pass must be from mobile Tuya app not from IoT Platform.
Another guess is about account, I have different account from app and IoT Platform.