SmartThings is not able to verify the registration of the WebHook SmartApp. Please make sure your app is available and properly implemented, and verify again.
According to the online documentation the response to a CONFIRMATION should be:
{
"targetUrl": "{TARGET_URL}"
}
I actually respond with:
{
"target_url": "{TARGET_URL}"
}
I didn’t make that up as that was what was documented at the time. The SmartApp SDK doesn’t seem to define any response at all so it seems likely that it doesn’t actually matter and all it is waiting for is the GET.
Strictly speaking you shouldn’t call the confirmation URL automatically without checking the app ID as it means anyone knowing your target URL can register their own app. Indeed you are encouraged to do it manually. That’s an aside though.
I just want to use Device API but PAT gets expired within 24 hrs.
I’m not sure how to achieve this?
I have created an API_ONLY app from smarthings cli and From Workspace I created an smartAPP for automation.
For both the cases just got Client Id and Client secret but I don’t know how to use them to get auth code and tokens to consume smartthings /devices api to control the Smasung Smart TV.
NOTE: Remember the OAuth integration has alimit of 500 installations by default. Each time a user authorizes access to one of his/her locations, it will count as 1 installation. This means, if a user has 3 locations and authorizes access to each of them, he/she will use 3 installations.