SmartApp WebServices doesnt ask for authorization of switches?


(Scott Coleman) #1

I’m building upon the Web Services example at

SmartThingsCommunity/Code/blob/master/smartapps/tutorials/web-services-smartapps/smartapp/web-services-smartapp.groovy

I have Oauth worked out fine - I’m receiving the bearer token, but when the app starts it does not ask the user for authorization to use switches. I must be missing something

My Preferences and Mapings:
preferences {
section (“Allow external service to control these things…”) {
input “switches”, “capability.switch”, multiple: true, required: true
}
}

mappings {
path("/switches") {
action: [
GET: “listSwitches”
]
}
path("/switches/:command") {
action: [
PUT: “updateSwitches”
]
}
}