1
Votes

tplink-cloud-api: Error: code=-23003v"App version is too old"

 
1
Votes

tplink-cloud-api: Error: code=-23003v"App version is too old"

tplink-cloud-api: Error: code=-23003v"App version is too old"
tplink-cloud-api: Error: code=-23003v"App version is too old"
2025-02-20 23:15:54

I am trying to use the Kasa tplink-cloud-api in my Node.js Express application. When I try to authenticate, i.e., const tplink = await login(username, password, terminalUUID), I get the error code noted in my subject line.

I've installed the latest version of tplink-cloud-api (0.8.1). I know that part of it is working because if I intentionally insert the wrong email, I get an error saying the email or password does not match.
 

The code is straightforward:

async function outletInfo() {  
    const username = "XXXX@gmail.com"; 
    const password = "XXXX"; const { v4: uuidv4 } = require('uuid'); 
    const terminalUUID = uuidv4();try {
 try {
    // Log in to the TP-Link Cloud API and get an instance
    const tplink = await login(username, password, terminalUUID);
    console.log("Logged in successfully. Token:", tplink.getToken());

    // Retrieve the device list registered to your account
    const deviceList = await tplink.getDeviceList();
    console.log("Device List:", JSON.stringify(deviceList, null, 2));

    // Assume you have a smart plug with an alias "My Smart Plug"
    const smartPlug = tplink.getHS100("My Smart Plug");

    // Toggle the smart plug (if it's on, this will turn it off; if off, it will turn it on)
    const toggleResponse = await smartPlug.toggle();
    console.log("Toggle Response:", JSON.stringify(toggleResponse, null, 2));

     } catch (error) {
    console.error("Error:", error);
  }
}
#1
Options
1 Reply
Re:tplink-cloud-api: Error: code=-23003v"App version is too old"
2025-02-25 20:53:12

  @MattMel 
I have been told that their API is only for approved developers.  The code provided in GitHub (about 4-5 years ago) no longer works.  This makes it useless for me because I need to control them from a Javascript program hosted in the cloud.  I am now looking at Shelly because they have open API.  I woul only recommend Kasa (and, even then, probably not) for people who only want to control it through their app.

#2
Options
icon

Accessibility Adjustments

icon RESET

Choose the right accessibility profile for you

OFF

Seizure Safe

Eliminates flashes and reduces color

OFF

Cognitive Disability

Assists with reading and focusing

OFF

Vision Impaired

Enhances the website's visuals

OFF

ADHD Friendly

More focus and fewer distractions

Content Adjustments

Adjust Scale

icon
100%
icon

Highlight Title

icon

Highlight Link

icon

Text Magnifier

icon

Readable Font

icon

Adjust Fontsize

icon
100%
icon

Align Center

icon

Adjust LineHeight

icon
100%
icon

Align Left

icon

Adjust LetterSpacing

icon
100%
icon

Align Right

icon

Color Adjustment

Low Saturate

icon

High Saturate

icon

Dark Contrast

icon

Light Contrast

icon

Set Text Colors

Monochrome

icon

Set Title Colors

High Contrast

icon

Set BackgroundColor

Orientation Adjustments

Muted

icon

Hide Images

icon

Read Mode

icon

Stop Animation

icon

Reading Mask

icon

Highlight Hover

icon

Big Black Cursor

mutedicon

Big White Cursor

icon

Hide Video/Audio

icon

Stop Video

icon

Stop Audio

icon

Hide Animation

icon

Reading Guide

icon

Useful Links