API call TV app

Hello guys ! I’m using the translator, forgive me if there are errors.

I’m trying to call an application (Netflix, Spotify…) on the Samsung TV, through the SmartThings API.

image

But when I call this function nothing happens, can someone help me?

Just as a reference for others, this is the solution that, @Estronic shared:

Thanks, @Estronic!

Has anyone identified any other apps to add to the previous list?

Also, somewhat related, has anyone identified a way to navigate directly to the gaming hub on the TV?

Hi, @nayelyz! The code above doesn’t work on a QN900A from 2021. Is there someplace where this API is documented?

Sorry, but it doesn’t belong to the SmartThings capabilities which means it was created by the developer of the integration, and we don’t have information about which values it expects.
The one that should know is the device manufacturer and those who integrated it into ST, I don’t know if Samsung shared the technical sheet of this device with this info, have you searched for it online? That’s how @Estronic found that info.

BTW, Welcome to the SmartThings Community!

Thanks so much for the welcome, @nayelyz!

Actually, what I’m looking for is the documentation of Samsung’s SmartTvs APIs.

Do you know what app id is for samsung smart tv browser? It works for HBO netflix, youteube, but i would like to open network browser with api.

Either this:
{
“commands”: [
{
“component”: “main”,
“capability”: “custom.launchapp”,
“command”: “launchApp”,
“arguments”:[“webbrowser”]
}
]
}

Or this:

{
“commands”: [
{
“component”: “main”,
“capability”: “custom.launchapp”,
“command”: “launchApp”,
“arguments”:[“Internet”]
}
]
}

or this:
{
“commands”: [
{
“component”: “main”,
“capability”: “custom.launchapp”,
“command”: “launchApp”,
“arguments”:[“org.tizen.browser”]
}
]
}

Has worked for me (can’t test now, those are in my local documentation. What i do remember is that it takes al long time for my television to respond and go to the browser.

Hi,

Has anyone made any progress on this? This code is outdated… It doesn’t work for me…
I have a Samsung S95B TV…
I really just want the code to turn on a switch when I open YouTube on the TV and another code to open YouTube on the TV when I turn on a switch…
Can anyone help???

Would love if someone could get this going.

I think is not too difficult because if i open the TV device in mysmartthings advanced and in commands table, click on launchApp and type there “YouTube” or “111299001912” my TV open YouTube app… Just need the right code to do the same with a rule…

If you use the ST CLI with the debug option like this “SMARTTHINGS_DEBUG=true smartthings devices:commands”, you’ll see the API calls that are made for the command(s). Just do the same commands with the CLI that you are using in the AWA.


[2026-04-18T11:09:35.722] [DEBUG] login-authenticator - authentication - enter
[2026-04-18T11:09:35.722] [DEBUG] rest-client - making axios request: {"url":"https://api.smartthings.com/devices/96c197ca-xxxx-xxxx-xxxx-5c0d0cf32dcc/commands","method":"post","headers":{"Content-Type":"application/json;charset=utf-8","Accept":"application/json","User-Agent":"@smartthings/cli","Accept-Language":"en-US","Authorization":"Bearer f52a05c2-xxxx-xxxx-xxxx-xxxxxxxxxxxx"},"data":{"commands":[{"component":"main","capability":"switch","command":"off"}]}}

Despite what the examples in the API reference still show, several years on, the command arguments in Rules are arrays of objects, with the key being the type. For example:

"arguments": [  {  "string": "YouTube" }  ]

Bingo

Bingo!!!

Thank you… So easy!!!

This code work to open youtube with a switch:

{
“if”: {
“equals”: {
“left”: {
“device”: {
“devices”: [
“YOUR-SWITCH-DEVICE-ID”
],
“component”: “main”,
“capability”: “switch”,
“attribute”: “switch”,
“trigger”: “Always”
}
},
“right”: {
“string”: “on”
}
},
“then”: [
{
“command”: {
“devices”: [
“YOUR-TV-DEVICE-ID”
],
“commands”: [
{
“component”: “main”,
“capability”: “custom.launchapp”,
“command”: “launchApp”,
“arguments”: [
{
“string”: “111299001912”
}
]
}
]
}
}
]
}
}

I’ve tryed for YouTube, Netflix, PrimeVideo and Spotify… All of them start on TV with this kind of rule…

50% done…

Now the dificult part…

How turn on my switch when i launch YouTube from TV???

Hi, @Pyrylamo
Do you see the value of 111299001912 saved somewhere? You would need to check if a capability changes status when this particular app starts running. This way, you can use it as a condition in a separate Rule.
If not, you could send a command to that switch next to the one that launches the app in the Rule you already defined. It can look like this:

{
   "if":{
      "equals":{
         "left":{
            "device":{
               "devices":[
                  "YOUR-SWITCH-DEVICE-ID"
               ],
               "component": "main",
               "capability": "switch",
               "attribute": "switch",
               "trigger": "Always"
            }
         },
         "right":{
            "string":"on"
         }
      },
      "then":[
         {
            "command":{
               "devices":[
                  "YOUR-TV-DEVICE-ID"
               ],
               "commands":[
                  {
                     "component": "main",
                     "capability": "custom.launchapp",
                     "command": "launchApp",
                     "arguments":[
                        {
                           "string": "111299001912"
                        }
                     ]
                  }
               ]
            }
         },
         {
            "command":{
               "devices":[
                  "YOUR-SWITCH-DEVICE-ID"
               ],
               "commands":[
                  {
                     "component": "main",
                     "capability": "switch",
                     "command": "on"
                  }
               ]
            }
         }     
      ]
   }
}

Doesn´t work…

The wonly thing that change when i open YouTube from the TV is this:

But only change if i have Smartthings app open…

Even if i create a rule with this capabilitiy to turn on my switch only work with app open. If i close de app the rule take no more effect…

Ok, then there’s no other option than the one I mentioned above. The issue will be when the app is opened from another source and not the Rule.
OCF devices work more on the client (app) level rather than the API level. That’s why you can find behavior like the one of the tvChannel capability you mentioned.
Here’s more info about this: