SmartApps
Generate an App's OAuth Client/Secret
Changed onWhen an app is first created, an OAuth client/secret are automatically generated for the integration. However, there are times when it may be useful to re-generate a client/secret such as in cases where a secret becomes compromised.
post/smartapps/{appNameOrId}/oauth/generate
Request
- Base URLhttps://api.smartthings.com/v1
- AuthOAuth 2Implicithttps://auth-global.api.smartthings.comScopesw:smartapps
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
appNameOrIdstring required
The appName or appId field of an app.
Headers
Authorizationstring string required
OAuth token
Request body
Example request
{
"clientName": "My SmartThings Integration",
"scope": [
"r:installedapps",
"w:installedapps"
]
}Response
A response object containing the newly created OAuth Client ID/Secret and relevant details pertaining to the OAuth client.
Example response
{
"oauthClientDetails": {
"clientName": "My SmartThings Integration",
"scope": [
"r:installedapps",
"w:installedapps",
"x:installedapps"
]
},
"oauthClientId": "7cd4d474-7b36-4e03-bbdb-4cd4ae45a2be",
"oauthClientSecret": "9b3fd445-42d6-441b-b386-99ea51e13cb0"
}Changes
- info
endpoint added
- info