# Trying to log in Node JS - Invalid Token

**URL:** <https://community.homey.app/t/trying-to-log-in-node-js-invalid-token/2454>\
**Category:** Questions & Help\
**Created:** [October 4, 2018, 8:06pm UTC](https://community.homey.app/t/trying-to-log-in-node-js-invalid-token/2454 "2018-10-04T20:06:13Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Niklas\_Ward](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/niklas_ward/32/941_2.png) [@Niklas\_Ward](https://community.homey.app/u/Niklas_Ward)\
**Post date:** [October 4, 2018, 8:06pm UTC](https://community.homey.app/t/trying-to-log-in-node-js-invalid-token/2454/1 "2018-10-04T20:06:13Z")

</div>

When trying to log in to homey in Node JS I copy and paste the token i got from [http://go.athom.com/cli-login](http://go.athom.com/cli-login) , but it only replyes Invalid Token please try again.

Anyone who knows what to do?

---

<div class="post-metadata">

**Author:** ![Not2Fast](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/not2fast/32/1239_2.png) [@Not2Fast](https://community.homey.app/u/Not2Fast)\
**Post date:** [October 4, 2018, 8:23pm UTC](https://community.homey.app/t/trying-to-log-in-node-js-invalid-token/2454/2 "2018-10-04T20:23:04Z")

</div>

Same here. Both on Win and MacOS.

---

<div class="post-metadata">

**Author:** ![Klaus\_Andersen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/klaus_andersen/32/10275_2.png) [@Klaus\_Andersen](https://community.homey.app/u/Klaus_Andersen)\
**Post date:** [October 4, 2018, 8:39pm UTC](https://community.homey.app/t/trying-to-log-in-node-js-invalid-token/2454/3 "2018-10-04T20:39:08Z")

</div>

Same here - to 1.5.13-rc.11 from Windows 10

---

<div class="post-metadata">

**Author:** ![Caseda](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/caseda/32/138695_2.png) [@Caseda](https://community.homey.app/u/Caseda)\
**Post date:** [October 5, 2018, 5:25am UTC](https://community.homey.app/t/trying-to-log-in-node-js-invalid-token/2454/4 "2018-10-05T05:25:20Z")

</div>

Athom is aware of the issue, and is going to look into it as soon as possible.

---

<div class="post-metadata">

**Author:** ![JeroenVollenbrock](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeroenvollenbrock/32/98_2.png) [@JeroenVollenbrock](https://community.homey.app/u/JeroenVollenbrock)\
**Post date:** [October 5, 2018, 12:04pm UTC](https://community.homey.app/t/trying-to-log-in-node-js-invalid-token/2454/5 "2018-10-05T12:04:31Z")

</div>

The problem can be resolved by installing the newest version (2.1.83)

---

<div class="post-metadata">

**Author:** ![Nicklas\_Olofsson](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/nicklas_olofsson/32/14381_2.png) [@Nicklas\_Olofsson](https://community.homey.app/u/Nicklas_Olofsson)\
**Post date:** [October 5, 2018, 3:25pm UTC](https://community.homey.app/t/trying-to-log-in-node-js-invalid-token/2454/6 "2018-10-05T15:25:31Z")

</div>

I can not find 2.1.83

---

<div class="post-metadata">

**Author:** ![johan\_bendz](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johan_bendz/32/10344_2.png) [@johan\_bendz](https://community.homey.app/u/johan_bendz)\
**Post date:** [October 5, 2018, 4:35pm UTC](https://community.homey.app/t/trying-to-log-in-node-js-invalid-token/2454/7 "2018-10-05T16:35:42Z")

</div>

The version with the fix is 2.1.38. typo by Jeroen 🙂

Run npm i -g athom-cli to get the latest version.

---

<div class="post-metadata">

**Author:** ![Niklas\_Ward](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/niklas_ward/32/941_2.png) [@Niklas\_Ward](https://community.homey.app/u/Niklas_Ward)\
**Post date:** [October 5, 2018, 7:04pm UTC](https://community.homey.app/t/trying-to-log-in-node-js-invalid-token/2454/9 "2018-10-05T19:04:42Z")

</div>

Trying to update it i get theese errors… I am not aware of any restrictions in filesystem…

828 verbose argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node\_modules\npm\bin\npm-cli.js” “install” “athom-api”  
829 verbose node v10.11.0  
830 verbose npm v6.4.1  
831 error path C:\Program Files\nodejs\node\_modules.staging  
832 error code EPERM  
833 error errno -4048  
834 error syscall mkdir  
835 error Error: EPERM: operation not permitted, mkdir ‘C:\Program Files\nodejs\node\_modules.staging’  
835 error { [Error: EPERM: operation not permitted, mkdir ‘C:\Program Files\nodejs\node\_modules.staging’]  
835 error cause:  
835 error { Error: EPERM: operation not permitted, mkdir ‘C:\Program Files\nodejs\node\_modules.staging’  
835 error errno: -4048,  
835 error code: ‘EPERM’,  
835 error syscall: ‘mkdir’,  
835 error path: ‘C:\Program Files\nodejs\node\_modules\.staging’ },  
835 error stack:  
835 error ‘Error: EPERM: operation not permitted, mkdir ‘C:\Program Files\nodejs\node\_modules\.staging’’,  
835 error errno: -4048,  
835 error code: ‘EPERM’,  
835 error syscall: ‘mkdir’,  
835 error path: ‘C:\Program Files\nodejs\node\_modules\.staging’ }  
836 error The operation was rejected by your operating system.  
836 error It’s possible that the file was already in use (by a text editor or antivirus),  
836 error or that you lack permissions to access it.  
836 error  
836 error If you believe this might be a permissions issue, please double-check the  
836 error permissions of the file and its containing directories, or try running  
836 error the command again as root/Administrator (though this is not recommended).

---

<div class="post-metadata">

**Author:** ![Not2Fast](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/not2fast/32/1239_2.png) [@Not2Fast](https://community.homey.app/u/Not2Fast)\
**Post date:** [October 5, 2018, 8:21pm UTC](https://community.homey.app/t/trying-to-log-in-node-js-invalid-token/2454/10 "2018-10-05T20:21:02Z")

</div>

That works. Thx.
