PUT /v1/apps/{id}/oauth corrupts wildcard scope entries (* → $) — reproducible, confirmed via direct API call

I’m setting up an OAuth-In SmartApp (API_ONLY / CONNECTED_SERVICE) for a personal integration and hit a reproducible server-side bug when updating the app’s OAuth scope.

Steps to reproduce:

  1. Create an OAuth-In app via smartthings apps:create (or via the API), with scope ["r:devices:*"] (or any scope ending in *).
  2. Call PUT https://api.smartthings.com/v1/apps/{appId}/oauth with a clean body:
{
  "clientName": "ILX",
  "scope": ["r:devices:*", "x:devices:*"],
  "redirectUris": ["https://example.com/callback"]
}
  1. The response immediately comes back corrupted:
{
  "clientName": "ILX",
  "scope": ["r:devices:$", "x:devices:*", "r:devices:*", "x:devices:$"],
  "redirectUris": ["https://example.com/callback"],
  "corsDomains": []
}

Confirmed NOT a client-side issue:

  • Reproduced identically via the smartthings-cli (apps:oauth:update, both interactively and with -i/JSON input).
  • Reproduced by calling the raw REST API directly with curl/Node’s https module, bypassing the CLI entirely, with a manually-verified clean JSON body and a valid bearer token.
  • --dry-run on the CLI confirms the outgoing request body is clean before it’s ever sent.
  • Every scope entry ending in * gets duplicated: one correct copy, and one corrupted copy with the trailing * replaced by $.
  • The corruption compounds with repeated update calls (retrying just adds more corrupted duplicates rather than replacing the list).

Impact: This makes the authorization endpoint (/oauth/authorize) return error=unsupported_response_type for response_type=code on any app in this corrupted state — presumably because scope validation chokes on the malformed stored list. This blocks the entire OAuth-In flow for third-party integrations.

Environment: @smartthings/cli v2.1.1 and v2.1.2 (bug present in both), Windows 11, reproduced on 2026-09-13.