SmartApps

Generate an App's OAuth Client/Secret

Changed on

When 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

Path parameters

appNameOrIdstring required

The appName or appId field of an app.

Headers

Authorizationstring string required

OAuth token

Request body

clientNamestring

A name given to the OAuth Client.

scopestring[]

A list of SmartThings API OAuth scope identifiers that may be required to execute your integration.

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.

oauthClientIdstring uuid

The OAuth Client ID.

oauthClientSecretstring uuid

The OAuth Client Secret.

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