I have a smartapp that subscribes to device events and potentially sends commands to a different device.
I used to have read permissions, and it worked. Today, it was giving me 403 messages. I then spent a couple of happy hours struggling with assuming that there was a hierarchy of permissions ie Write would include read and execute. This doesnt seem to be the case. I finally fixed it by requesting Read, Write and Execute when I construct the app,
Is this correct behaviour of smartapps and permissions?
Also, what is the correct form of supplying permissions in the constructor? I use
âw:devices:", "r:devices:â, âx:devices:*â
They need to match the format of the ones youâve whitelisted in the Developer Workspace.
This provides permissions for every device in the location, if you donât include them, you only have permissions for the devices selected in your settings. You can verify this by checking the payload of the INSTALL REQUEST lifecycle to see the permissions included. If they have the device ID, your SmartApp token will only have access to those. For example:
Argh So sorry, I wasnât actually reporting a bug, more asking for clarification.
Since I posted, I have noticed that the documentation is clear that âwriteâ does not include âreadâ or âexecuteâ (I have understood this correctly, right?)
SmartThings is behaving as per documentation, there is nothing for you to replicate