I have worked through the HTTP API and can’t get authorization to work.
Here’s the device preferences:
section("Allow Endpoint to Control These Things...") {
input "sensors", "capability.contactSensor", title: "Which Sensors?", multiple: true
input "relays", "capability.polling", title: "Which Relays?", multiple: true
}
Here’s the mappings:
mappings {
path("/sensors") {
action: [
GET: "listSensors"
]
}
path("/sensors/:id") {
action: [
GET: "showSensor"
]
}
path("/sensors/:id/:command") {
action: [
GET: "updateSensor"
]
}
path("/relays") {
action: [
GET: "listRelays"
]
}
path("/relays/:id") {
action: [
GET: "showRelay"
]
}
path("/relays/:id/:command") {
action: [
GET: "updateRelay"
]
}
}
I made it through the OAuth and was returned my token, and was able to assemble this URL:
https://graph.api.smartthings.com/api/smartapps/installations/$Client_id/sensors?access_token=$token
This returns:
{"error":true,"type":"AccessDenied","message":"This request is not authorized by the specified access token"}
Note: I authorized these devices on the OAuth page
What did I miss?