Service Method Call Denied - "Denied method call for category '/'"

Hello everyone,

I’m developing a service for webOS and have run into a permission issue. I’ve defined a simple method in my services.json, I added the public in the command, but when I try to call it from another app, I get the error: “Denied method call ‘myMethod’ for category ‘/’”.

Here is my services.json:

  "id": "com.mycompany.myservice",
  "services": [
    {
      "name": "com.mycompany.myservice",
      "commands": [
        {
          "name": "myMethod",
          "public": true
        }
      ]
    }
  ]
}

My service.register(“myMethod”, …) implementation in the JavaScript file is straightforward.

I feel like I’m missing a permissions step but can’t find it in the documentation. Does anyone know what causes this and how to fix it?

Thanks in advance!

Please check again with Hello World Service sample app. Thank you.

Hi @narae0.kim ;

Thank you for your response. But the Hello World Service example shows a basic service. My question is how to make methods public for other apps. I tried with “public” in the commands list but it didn’t work ?

Best regards.

JS servcies can only be called within the same app package. Thank you.

Hi @narae0.kim

Thank you for your answer. But looking to this official documentation: https://webostv.developer.lge.com/develop/references/services-json
It says that there is a public property in the service.json that do the following: The default value is false. In order to make the command available to all apps, you must set this property to true.

In which case that public property is used ?

Thank you.
Best regards.

Hi @narae0.kim
Please check my previous comment.