SmartThings CLI 2.1.2: login fails with server_error since 14 November

smartthings locations opens the browser, I log in, and the CLI ends with “error trying to authenticate server_error” and “unable to get authentication info”. Before that the stored login failed to refresh with a 401. Same result after removing the stored credentials, on Windows 11. A personal access token works fine with the same account. Is this a known problem on the server side?

I’ve not seen that particular issue, at least not in that form, though I am now on version 3.0.0. I do note a couple of things:

The configuration documentation hasn’t been updated to reflect that on Windows 11 the Config folder is now under %APPDATA%\@smartthings\cli. The Dataand Logfolders files remain under %LOCALAPPDATA%\@smartthings\cli. The change actually came around version 2.0.0.

It was always the case that you would login to the CLI once and then it would automatically refresh the tokens whenever the access token was less than an hour away from expiry (or had expired). You wouldn’t notice. Of late, say for the last month of two, I have found that I am being asked to login much more frequently. I never see any error messages displayed but I see in the error log there were a few instances of:

login-authenticator - error trying to refresh token: Request failed with status code 401

As a login attempt immediately follows a failed refresh this is probably why I have been encountering the logins.

I’m not sure if I still see this with 3.0.0.

Thanks. I tested with CLI 3.0.1 as well (Windows on ARM, Node 24) and get the same result: the browser login completes, and about 16 seconds after the redirect to oauth/authorize the CLI reports “Unexpected server error”. Same behaviour on 2.1.2, so it does not look like a CLI version issue. Since it works for you on 3.0.0, it may be tied to my account or region (EU). For now I use a personal access token as a workaround. If anyone else sees this, or knows what to check on the account side, I would like to hear it.