# \[SmartThings CLI\] Issue with the authentication

**URL:** <https://community.smartthings.com/t/smartthings-cli-issue-with-the-authentication/244227>\
**Category:** Support\
**Created:** [June 28, 2022, 3:57pm UTC](https://community.smartthings.com/t/smartthings-cli-issue-with-the-authentication/244227 "2022-06-28T15:57:23Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joao\_Santos](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/joao_santos/32/157061_2.png) [@Joao\_Santos](https://community.smartthings.com/u/Joao_Santos)\
**Post date:** [June 28, 2022, 3:57pm UTC](https://community.smartthings.com/t/smartthings-cli-issue-with-the-authentication/244227/1 "2022-06-28T15:57:23Z")

</div>

After i type the command “.\smartthings edge:drivers:logcat” it takes me to the smartthing page to authorize my account. I click authorize and shows that error.

 ![Captura de ecrã 2022-06-28, às 16.55.20](https://global.discourse-cdn.com/smartthings/original/3X/8/3/835f8193560c650a43b6a57227d742d00d517ec2.png)  
 ![Captura de ecrã 2022-06-28, às 16.55.23](https://global.discourse-cdn.com/smartthings/original/3X/0/d/0d44322b4a79d6a5f0703553108ef1bd70b65612.png)  
 ![Captura de ecrã 2022-06-28, às 16.55.27](https://global.discourse-cdn.com/smartthings/original/3X/2/3/23a8606a9268bc2ec59ba608b322d2166c32f680.png)

---

<div class="post-metadata">

**Author:** ![Mariano\_Colmenarejo](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/mariano_colmenarejo/32/220132_2.png) [@Mariano\_Colmenarejo](https://community.smartthings.com/u/Mariano_Colmenarejo)\
**Post date:** [June 28, 2022, 4:00pm UTC](https://community.smartthings.com/t/smartthings-cli-issue-with-the-authentication/244227/2 "2022-06-28T16:00:25Z")

</div>

Try to logging in your IDE Page first.

---

<div class="post-metadata">

**Author:** ![Joao\_Santos](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/joao_santos/32/157061_2.png) [@Joao\_Santos](https://community.smartthings.com/u/Joao_Santos)\
**Post date:** [June 28, 2022, 4:03pm UTC](https://community.smartthings.com/t/smartthings-cli-issue-with-the-authentication/244227/3 "2022-06-28T16:03:07Z")

</div>

I was already logged in. I tried to to clear all info in the browser and log in again. Still the same error

---

<div class="post-metadata">

**Author:** ![Mariano\_Colmenarejo](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/mariano_colmenarejo/32/220132_2.png) [@Mariano\_Colmenarejo](https://community.smartthings.com/u/Mariano_Colmenarejo)\
**Post date:** [June 28, 2022, 4:04pm UTC](https://community.smartthings.com/t/smartthings-cli-issue-with-the-authentication/244227/4 "2022-06-28T16:04:42Z")

</div>

> [@Joao\_Santos](#):
>
> After i type the command “.\smartthings edge:drivers:logcat” it takes me to the smartthing page to authorize my account. I click authorize and shows that error.

Hi @nayelyz

Can you help on this issue with CLI?

---

<div class="post-metadata">

**Author:** ![Joao\_Santos](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/joao_santos/32/157061_2.png) [@Joao\_Santos](https://community.smartthings.com/u/Joao_Santos)\
**Post date:** [June 28, 2022, 4:11pm UTC](https://community.smartthings.com/t/smartthings-cli-issue-with-the-authentication/244227/5 "2022-06-28T16:11:27Z")

</div>

I tried with chrome, Firefox, windows and even on mac…always the same error

---

<div class="post-metadata">

**Author:** ![nayelyz](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@nayelyz](https://community.smartthings.com/u/nayelyz)\
**Post date:** [June 28, 2022, 5:13pm UTC](https://community.smartthings.com/t/smartthings-cli-issue-with-the-authentication/244227/6 "2022-06-28T17:13:09Z")

</div>

Hi, @Joao_Santos!

Please, try the following first:

1. Go to this path in the Windows explorer:

```auto
%LOCALAPPDATA%\@smartthings\cli

```

1. Delete all the files included there. This is where the Access Token generated automatically is saved, so this will force a refresh.  
 ![image](https://global.discourse-cdn.com/smartthings/original/3X/8/1/819d76c18cdabe59940e65460fcc830ed0b8bec0.png)
2. Now, execute a command like:

```auto
.\smartthings devices

```

This will show you the authorization page again, click on “authorize” and let me know your results.

---

<div class="post-metadata">

**Author:** ![Joao\_Santos](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/joao_santos/32/157061_2.png) [@Joao\_Santos](https://community.smartthings.com/u/Joao_Santos)\
**Post date:** [June 28, 2022, 5:35pm UTC](https://community.smartthings.com/t/smartthings-cli-issue-with-the-authentication/244227/7 "2022-06-28T17:35:38Z")

</div>

Same error message.  
It doesnt get to the part where the credentials file is created. So when i acess the first path “%LOCALAPPDATA%@smartthings\cli” it only have a txt file with the error message.

 ![Captura de ecrã 2022-06-28, às 18.27.30](https://global.discourse-cdn.com/smartthings/original/3X/5/c/5cab58ce3b8ec9bb1165d8730a38a7112a69920b.png)  
 ![Captura de ecrã 2022-06-28, às 18.27.53](https://global.discourse-cdn.com/smartthings/original/3X/0/b/0b40b0225ac3f7a2778ead365eca3a04b054a795.png)

---

<div class="post-metadata">

**Author:** ![nayelyz](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@nayelyz](https://community.smartthings.com/u/nayelyz)\
**Post date:** [June 28, 2022, 6:14pm UTC](https://community.smartthings.com/t/smartthings-cli-issue-with-the-authentication/244227/8 "2022-06-28T18:14:03Z")

</div>

> [@Joao\_Santos](#):
>
> It doesnt get to the part where the credentials file is created. So when i acess the first path “%LOCALAPPDATA%@smartthings\cli” it only have a txt file with the error message.

Ok, now, can you [enable the logging mode](https://github.com/SmartThingsCommunity/smartthings-cli#enable-debug-logging) for this command to see if it shows more information than the `smartthings` file you shared, please?  
For example:

```auto
SMARTTHINGS_DEBUG=true .\smartthings devices

```

---

<div class="post-metadata">

**Author:** ![Joao\_Santos](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/joao_santos/32/157061_2.png) [@Joao\_Santos](https://community.smartthings.com/u/Joao_Santos)\
**Post date:** [June 28, 2022, 6:45pm UTC](https://community.smartthings.com/t/smartthings-cli-issue-with-the-authentication/244227/9 "2022-06-28T18:45:44Z")

</div>

It doesn’t seems to recognize the command.

 ![Captura de ecrã 2022-06-28, às 19.44.20](https://global.discourse-cdn.com/smartthings/original/3X/f/a/fad4669efb8a15e7c38738e592452d4a49ad8eb4.png)

---

<div class="post-metadata">

**Author:** ![nayelyz](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@nayelyz](https://community.smartthings.com/u/nayelyz)\
**Post date:** [June 28, 2022, 7:30pm UTC](https://community.smartthings.com/t/smartthings-cli-issue-with-the-authentication/244227/10 "2022-06-28T19:30:28Z")

</div>

oh, do you have the [latest version](https://github.com/SmartThingsCommunity/smartthings-cli/releases) of the CLI?  
 ![image](https://global.discourse-cdn.com/smartthings/original/3X/a/c/acba6bb0aea59cf3f155cca17984b151b72f59a7.png)

---

<div class="post-metadata">

**Author:** ![orangebucket](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/orangebucket/32/81590_2.png) [@orangebucket](https://community.smartthings.com/u/orangebucket)\
**Post date:** [June 28, 2022, 8:04pm UTC](https://community.smartthings.com/t/smartthings-cli-issue-with-the-authentication/244227/11 "2022-06-28T20:04:36Z")

</div>

> [@Joao\_Santos](#):
>
> It doesn’t seems to recognize the command.

I think that might be a PowerShell syntax issue in trying to set the environment on the command line. In CMD I usually just do

`set SMARTTHINGS_DEBUG=true`

and then use the CLI normally. Translate that to PowerShell.

---

<div class="post-metadata">

**Author:** ![Joao\_Santos](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/joao_santos/32/157061_2.png) [@Joao\_Santos](https://community.smartthings.com/u/Joao_Santos)\
**Post date:** [June 28, 2022, 9:14pm UTC](https://community.smartthings.com/t/smartthings-cli-issue-with-the-authentication/244227/12 "2022-06-28T21:14:18Z")

</div>

Yes i have. I´m trying to use it today for the first time.

 ![Captura de ecrã 2022-06-28, às 22.13.23](https://global.discourse-cdn.com/smartthings/original/3X/9/2/92969ef1f966bf4e7cfa6b3bd42f9ebb5004c803.png)

---

<div class="post-metadata">

**Author:** ![nayelyz](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@nayelyz](https://community.smartthings.com/u/nayelyz)\
**Post date:** [June 28, 2022, 10:47pm UTC](https://community.smartthings.com/t/smartthings-cli-issue-with-the-authentication/244227/13 "2022-06-28T22:47:29Z")

</div>

> [@orangebucket](#):
>
> set SMARTTHINGS\_DEBUG=true

@orangebucket is right, first, execute this and then the SmartThings command. I use the [WSL of Ubuntu](https://ubuntu.com/wsl) so I didn’t notice the syntax is different, sorry.  
The first time I received this error, but I executed the command again and it worked correctly:

 ![image](https://global.discourse-cdn.com/smartthings/original/3X/3/f/3f5e09c70d2cbbd93f3257397a2dc002d99cab5e.png)

---

<div class="post-metadata">

**Author:** ![Joao\_Santos](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/joao_santos/32/157061_2.png) [@Joao\_Santos](https://community.smartthings.com/u/Joao_Santos)\
**Post date:** [June 28, 2022, 10:55pm UTC](https://community.smartthings.com/t/smartthings-cli-issue-with-the-authentication/244227/14 "2022-06-28T22:55:08Z")

</div>

> [@nayelyz](#):
>
> worked correct

I’ve tried it before but unfortunately it didn’t work too.  
Maybe i did something wrong, could you please walk me through the installation process just to be sure?

 ![Captura de ecrã 2022-06-28, às 23.50.27](https://global.discourse-cdn.com/smartthings/original/3X/a/e/aef921cccc3c985f53f28896fee5deaac605227d.png)

---

<div class="post-metadata">

**Author:** ![nayelyz](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@nayelyz](https://community.smartthings.com/u/nayelyz)\
**Post date:** [June 28, 2022, 11:26pm UTC](https://community.smartthings.com/t/smartthings-cli-issue-with-the-authentication/244227/15 "2022-06-28T23:26:49Z")

</div>

> [@Joao\_Santos](#):
>
> Maybe i did something wrong, could you please walk me through the installation process just to be sure?

Here are the instructions:

> [@(EDGE Driver-Mc): Zigbee Drivers for Motion, Open/Close, Moisture, Smoke-Co Sensors and others Devices](https://community.smartthings.com/t/beta-zigbee-edge-driver-compatible-with-lidl-ecosmart-osram-smartthings-others/231689/335#initialize-the-hub-logging-1):
>
> Hi, if, by offline you mean that it shows the cloud icon like in this picture you shared: This means the capabilities weren’t initialized and your device is not reporting new values, this could be because: The joining process wasn’t completed (you need to wait in the “scan nearby” page a few seconds after the device is found) There was an error during the joining process. (you can verify this in the Hub logs) Initialize the Hub logging Download the [latest release](https://github.com/SmartThingsCommunity/smartthings-cli/releases) of the CLI and save it in a specific folder Open that folder in the terminal and run a simple command such as smartthings devices This will open a browser page where you have to log in to your account and authorize the access. Once it says “you can close this window”, run the command smartthings edge:drivers:logcat. It wi…

I tried to do the same in the PowerShell and it doesn’t work for me either, so, I suggest you use the CMD instead.

---

<div class="post-metadata">

**Author:** ![Joao\_Santos](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/joao_santos/32/157061_2.png) [@Joao\_Santos](https://community.smartthings.com/u/Joao_Santos)\
**Post date:** [June 29, 2022, 5:36pm UTC](https://community.smartthings.com/t/smartthings-cli-issue-with-the-authentication/244227/16 "2022-06-29T17:36:05Z")

</div>

I got the same result as before.

 ![Captura de ecrã 2022-06-29, às 18.34.11](https://global.discourse-cdn.com/smartthings/original/3X/0/1/013be4e1a695958eb85912872b66f04fc1a0f0f1.png)

---

<div class="post-metadata">

**Author:** ![nayelyz](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@nayelyz](https://community.smartthings.com/u/nayelyz)\
**Post date:** [June 29, 2022, 5:42pm UTC](https://community.smartthings.com/t/smartthings-cli-issue-with-the-authentication/244227/17 "2022-06-29T17:42:32Z")

</div>

> [@nayelyz](#):
>
> The first time I received this error, but I executed the command again and it worked correctly:
> 
> ![image](https://global.discourse-cdn.com/smartthings/original/3X/3/f/3f5e09c70d2cbbd93f3257397a2dc002d99cab5e.png)

Did you execute the `set` command first as shown in this picture?

---

<div class="post-metadata">

**Author:** ![Joao\_Santos](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/joao_santos/32/157061_2.png) [@Joao\_Santos](https://community.smartthings.com/u/Joao_Santos)\
**Post date:** [June 29, 2022, 5:51pm UTC](https://community.smartthings.com/t/smartthings-cli-issue-with-the-authentication/244227/18 "2022-06-29T17:51:06Z")

</div>

> [@orangebucket](#):
>
> set SMARTTHINGS\_DEBUG=true

Yes and didnt worked.

 ![Captura de ecrã 2022-06-29, às 18.50.02](https://global.discourse-cdn.com/smartthings/original/3X/2/3/230093b640012e37ba47f712b73d25dfc1afec96.png)

---

<div class="post-metadata">

**Author:** ![nayelyz](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@nayelyz](https://community.smartthings.com/u/nayelyz)\
**Post date:** [June 29, 2022, 5:55pm UTC](https://community.smartthings.com/t/smartthings-cli-issue-with-the-authentication/244227/19 "2022-06-29T17:55:37Z")

</div>

> [@Joao\_Santos](#):
>
> Yes and didnt worked.

This was to get the logs shown in the console, so I can report the issue to the corresponding team. Thank you for sharing the picture.  
Just to confirm, is the email account you’re logging in to the same one you use in this forum?

---

<div class="post-metadata">

**Author:** ![Joao\_Santos](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/joao_santos/32/157061_2.png) [@Joao\_Santos](https://community.smartthings.com/u/Joao_Santos)\
**Post date:** [June 29, 2022, 6:02pm UTC](https://community.smartthings.com/t/smartthings-cli-issue-with-the-authentication/244227/20 "2022-06-29T18:02:00Z")

</div>

Yes its the same account. So theres nothing i could do right now?

[Next page](https://community.smartthings.com/t/smartthings-cli-issue-with-the-authentication/244227.md?page=2)
