Hi,
i have seen that the “old” smartthings mobile app is not working anymore. With it, i was able to create a smartapp through the api: SmartThings API and add permission to it from the mobile app.
Classification value is “AUTOMATION”
But now, I create a app with the api, i go to mobile app (in developer mode) and my smartapp created with the API is not listed in custom apps.
If i go (manually) to the developer workspace and i create a smartapp there, this manually-created smartapp is listed in custom, i can choose it and everything works fine.
Here is an example
async function createAPP(accessToken){
return new Promise((resolve,reject)=>{
var config={
method: 'POST',
url: `${urlBase}/apps`,
headers: {'Authorization': 'Bearer '+accessToken,'Content-Type': 'application/json',},
data: {
"appName": "myname",
"displayName": "My name",
"description": "App",
"singleInstance": false,
"iconImage": {
},
"appType": "WEBHOOK_SMART_APP",
"principalType": "LOCATION",
"classifications": [
"DEVICE"
],
"lambdaSmartApp": {
"functions": [
"arn:aws:lambda:eu-central-1:account-id:function:function-name:alias-name",
"arn:aws:lambda:ap-southeast-1:account-id:function:function-name:alias-name"
]
},
"webhookSmartApp": {
"targetUrl": "MYURL"
},
"oauth": {
"clientName": "My SmartThings Integration",
"scope": [
"r:devices:*",
"x:devices:*",
"i:deviceprofiles:*",
"r:locations:*"
]
},
"ui": {
"pluginUri": "MYURL",
"dashboardCardsEnabled": true,
"preInstallDashboardCardsEnabled": true
}
}
};
axios(config)
.then(r=>resolve(r))
.catch(e=>reject(e))
})
}