I have just created a smartapp (webhook) and I would like to add virtual devices.
The smartapp sends the device events to my server.
I have already managed to add device profiles.
POST to https://api.smartthings.com/v1/deviceprofiles
(Bearer : authToken of smartapp)
{
"name": "Light Profile",
"components": [{
"id": "main",
"capabilities": [{
"id": "switch"
}],
"categories": [{
"name": "Switch",
"categoryType": "manufacturer"
}]
}]
}
As well as the validation :
POST to https://api.smartthings.com/v1/deviceprofiles/PROFILE_ID/status
(Bearer : authToken of smartapp)
{
"deviceProfileStatus": "PUBLISHED"
}
But I can’t install any device :
I have applied this though:
POST to https://api.smartthings.com/v1/devices
(Bearer : authToken of smartapp)
{
"label": "Light",
"roomId": "ROOM_ID",
"locationId": "LOCATION_ID",
"app": {
"profileId": "PROFILE_ID",
"installedAppId": "INSTALLED_APP_ID"
}
}
It only returns a 403 error
Thank you for your help