Roku /keypress ECP command returning HTTP status code 401

I have two 43" TCL Roku TVs that I bought at different times a few years apart. One of them still works with my ECP commands, while the other one doesn’t and stopped working a week or two ago. I also have two more 43" TCL Roku TVs in my household that belong to a housemate that I could arrange some testing on as well, if more samples is helpful.

Here is the info from the About screen on each TV to help your engineers isolate the root cause for your customers:


Not Working TV:

TCL model: 43S435

Hardware ID: G109X

Serial number: available privately if needed

Software version: 12.5.5 - build 4174-CG

Device ID: available privately if needed

IP address: 192.168.187.109


Working TV:

TCL model: 43S403

Hardware ID: 7126X

Serial number: available privately if needed

Software version: 12.5.5 - build 4174-30

Device ID: available privately if needed

IP address: 192.168.187.71


Test setup for both samples: Tested from Elgato StreamDeck using two plugins - one called “API Request” and the other called “API Ninja”. Both of these plugins were configured to send “http:///keypress/PowerOn” and “http:///keypress/PowerOff” ECP commands as an HTTP POST request. I also tested using PowerShell from Windows 11 Professional with these commands (results below each command):

Invoke-WebRequest -Method Post -Uri “http://192.168.187.109:8060/keypress/PowerOn”

→ Returned error: Invoke-WebRequest : The remote server returned an error: (401) Unauthorized.

Invoke-WebRequest -Method Post -Uri “http://192.168.187.109:8060/keypress/PowerOff”

→ Returned error: Invoke-WebRequest : The remote server returned an error: (401) Unauthorized.

Invoke-WebRequest -Method Post -Uri “http://192.168.187.71:8060/keypress/PowerOn”

→ Returned expected response (TV powered on) with StatusCode 200

Invoke-WebRequest -Method Post -Uri “http://192.168.187.71:8060/keypress/PowerOff”

→ Returned expected response (TV powered off) with StatusCode 200

The results were the same with all 4 tests from the StreamDecks using both plugins from both computers (a total of 24 tests, 12 per computer, 1 set of 4 tests with each method described from each computer) as the PowerShell results. These results indicate that the TV is receiving the requests but is not responding to them for an unidentified reason and returns a HTTP 401 Unauthorized error. For unrecognized commands, it returns a HTTP 404 Not Found error, as expected. I also tested all of these conditions from two different computers to rule out an issue on one computer - the results were identical from both computers in all test cases.

It started working again tonight. No firmware update on the TV.

It is still broken here.

There wasn’t a firmware update the TV ad well. No idea why mine started working tonight.

Also started working for me overnight.

The API calls get a 200 now instead of 401.

I’m still getting 401

Mine wasn’t working this morning when I tried after reading these most recent reports, but it is working now this afternoon. No firmware updates, no changes in the TV configuration, nothing else changed in my environment, but my TV that wasn’t working is now working again somehow. There must be some kind of back channel communication between the Roku devices and Roku’s network, otherwise there’s no real explanation for what’s been happening. My formerly non-working but now working Roku TV is showing 3 days, 20 hours, and 51 minutes of uptime, so it hasn’t rebooted or reset or anything between not working and working again.

Grateful it’s working again, but that is a very weird and unexpected behavior and I’m not sure how I feel about that.

Is the difference that I’m using the 4K ultra device and not the TV? So far I’m seeing comments that some TVs are working.

Whatever changes are being made appears to be rolling out over time, so my best guess is that yours may be cleared up perhaps over the next day or so? I’m not sure how their systems are architected but usually with a large infrastructure footprint like Roku or Facebook or Google or the like, things get rolled out bit by bit to prevent having a big impact on everything at once in case they got something wrong. So fixes tend to roll out in groups, too, over short-ish periods of time.

I’d say that for people who are still having issues over the next few days, report back here if it’s not working yet by the weekend or by Monday.

Indeed, mine didn’t work yesterday, but is working today! :partying_face:

Mine is working again today! Fantastic, very happy.

I’d really like to know how this fixed was pushed so I can prevent this from happening in the future along with other problems they’ve caused me. I thought I had all of the roku domains blocked but this fix must be getting pushed out differently somehow. Time to start detailed logging all the requests these boxes make.

I was told they push little updates about once a week. This is why the home screen and the themes change without the firmware version updating. If someone figures out which ports needs to be blocked for this to stop, please share them.

They pushed an update on December 14 that also caused the symptoms. I would also like to disable these.

Why did this happen again? It was fixed 9 months ago and today it’s broken again!

curl -v -d ‘’ “http://your-ip:8060/keypress/home”

  • Trying your-ip:8060…
  • Connected to your-ip (your-ip) port 8060

POST /keypress/home HTTP/1.1
Host: your-ip:8060
User-Agent: curl/8.9.1
Accept: /
Content-Length: 2
Content-Type: application/x-www-form-urlencoded

  • upload completely sent off: 2 bytes
    < HTTP/1.1 403 Forbidden
    < Server: Roku/14.1.4 UPnP/1.0 Roku/14.1.4
    < Content-Length: 40
    < Cache-Control: no-cache
    < Content-Type: text/plain; charset=“utf-8”
    <
    ECP command not allowed in Limited mode.* Connection #0 to host your-ip left intact

So it seems there’s a new setting. This solved it for me:

Settings > System > Advanced system settings > Control by mobile apps > Permissive

But there was a good 10-12 minutes of panic and I was lucky I found the answer quickly.

Bro, my Roku just updated to version 14.5, I was literally looking for a solution to that error for 9 hours and finally found your answer and it worked perfectly for me, thank you very much!