Skip to content

@mega-yfue/eufy-sdk / tuya / buildUsernameTokenGetAction

Function: buildUsernameTokenGetAction()

ts
function buildUsernameTokenGetAction(countryCode, username): TuyaAction;

LOGIN step 1: fetch a pre-login RSA token for a Tuya uid. Wire-confirmed from the eufy Security app (com.oceanwing.battery.cam): wire action smartlife.m.user.username.token.get, v=2.0. Returns { token, publicKey, exponent } (RSA-2048 modulus + exponent as decimal strings).

Parameters

countryCode

string

username

string

Returns

TuyaAction

Independent and unofficial. Not affiliated with, endorsed by, or sponsored by Anker Innovations, Anker eufy, or eufy. "Anker eufy", "eufy" and "Anker" are trademarks of their respective owners. Use responsibly — rapid or failed logins can trigger captcha or temporary cooldowns.