-
Notifications
You must be signed in to change notification settings - Fork 53
Apps
You can develop a SmartApp either to integrate a cloud-connected device into SmartThings Cloud, or to create an Automation.
A cloud-connected device communicates to SmartThings Cloud through a third-party cloud and a Cloud Connector. A SmartApp Connector is typically used for implementing certain advanced features or customizing your device onboarding UX. You can see more information about Cloud connected devices here.
Automations allow a user to control their SmartThings ecosystem without manual intervention. An example of an Automation is a WebHook or AWS Lambda function that uses the SmartThings REST API to control and get status notifications from SmartThings devices. You can learn more about Automations here.
The Apps endpoint supports the following commands:
Note: The code for these functions can be found here.
-
list - Returns a list of all apps belonging to the user.
-
get - Returns a specific app.
-
create - Creates a new app. Requires a SignatureType and whether or not confirmation is required (true / false). For WEBHOOK_SMART_APPs the default SignatureType is ST_PADLOCK.
-
update - Updates a an app. Requires a UUID or the appName for the app and the new app definition.
-
getSettings - Get the settings of an app. Settings are string name / value pairs for optional use by the developer.
-
updateSettings - Update the settings of an app. Settings are string name / value pairs for optional use by the developer. Requires the appId (UUID) or the appName unique name.
-
updateSignatureType - Update the SignatureType of an app. The signature type determines what mechanism is used to verify the identity of endpoint apps. Requires the appId (UUID) or the appName unique name and the new signature type.
-
register - Pings the targetUrl of the app to verify its existence. Endpoint apps and API Access apps must be registered in order to receive events from SmartThings.
-
getOauth - Returns the OAuth information for this app, including the name, scopes, and redirect URLs, if any. Requires the appId (UUID) or the appName unique name.
-
updateOauth - Updates the OAuth definiton for this ap. Use this method to change the scopes or redirect URLs (for API access apps). This method does not change the clientId or clientSecret of the app. Requires the appId (UUID) or the appName unique name and the new OAuth definition.
-
regenerateOauth - Regenerate clientId and clientSecret for this app. Note that this operation will result in any currently authorized installed app instances to need to be re-authorized to make calls to SmartThings. Requires the appId (UUID) or the appName unique name and the new OAuth definition.
-
delete - Deletes the specified app. Requires the appId (UUID) or the appName unique name.