# Homey login fails?

**URL:** <https://community.homey.app/t/homey-login-fails/128279>\
**Category:** Developers\
**Created:** [January 19, 2025, 1:16pm UTC](https://community.homey.app/t/homey-login-fails/128279 "2025-01-19T13:16:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![bob\_schijvenaars](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bob_schijvenaars/32/34710_2.png) [@bob\_schijvenaars](https://community.homey.app/u/bob_schijvenaars)\
**Post date:** [January 19, 2025, 1:16pm UTC](https://community.homey.app/t/homey-login-fails/128279/1 "2025-01-19T13:16:00Z")

</div>

Hi!  
Trying out custom app development. I’m trying to login to my homey with the CLI using “homey login” which allows me to login using a browser ending with “Successfully authorized” but then the CLI complains with: “Invalid Account token”. Huh?  
What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [January 19, 2025, 3:22pm UTC](https://community.homey.app/t/homey-login-fails/128279/2 "2025-01-19T15:22:52Z")

</div>

Have you followed [Getting Started | Homey Apps SDK](https://apps.developer.homey.app/the-basics/getting-started) ?

On what OS are you and have you verified the latest versions Node and homey cli ?

Did you have to paste the token or continued it automatically?

---

<div class="post-metadata">

**Author:** ![bob\_schijvenaars](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bob_schijvenaars/32/34710_2.png) [@bob\_schijvenaars](https://community.homey.app/u/bob_schijvenaars)\
**Post date:** [January 19, 2025, 4:18pm UTC](https://community.homey.app/t/homey-login-fails/128279/3 "2025-01-19T16:18:13Z")

</div>

I’m on MacOS 14.7.1  
homey --version: 3.7.15  
node --version: v16.20.2  
npm --version: 8.19.4

I tried both ways: it normally logs me in directly, but there is a link as well in the CLI login response and clicking that allows me to copy/paste but that is also not accepted

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [January 19, 2025, 4:34pm UTC](https://community.homey.app/t/homey-login-fails/128279/4 "2025-01-19T16:34:55Z")

</div>

Are you logging in as admin (“Owner”) user? What type of Homey do you have?

---

<div class="post-metadata">

**Author:** ![bob\_schijvenaars](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bob_schijvenaars/32/34710_2.png) [@bob\_schijvenaars](https://community.homey.app/u/bob_schijvenaars)\
**Post date:** [January 19, 2025, 4:51pm UTC](https://community.homey.app/t/homey-login-fails/128279/5 "2025-01-19T16:51:43Z")

</div>

I’m logging in as owner (is that admin?)  
It’s a 2019 pro model

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [January 19, 2025, 7:17pm UTC](https://community.homey.app/t/homey-login-fails/128279/6 "2025-01-19T19:17:45Z")

</div>

On older CLI versions I had sometimes an issue updating the token in the local json file. You can delete this file and login again.  
But I use Windows and can’t say where the file is stored on iOS. Perhaps @robertklep can heelp?

---

<div class="post-metadata">

**Author:** ![bob\_schijvenaars](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bob_schijvenaars/32/34710_2.png) [@bob\_schijvenaars](https://community.homey.app/u/bob_schijvenaars)\
**Post date:** [January 20, 2025, 6:06am UTC](https://community.homey.app/t/homey-login-fails/128279/7 "2025-01-20T06:06:26Z")

</div>

Thanks! I found some json files in ~/.nvm/versions/node/v16.20.2/lib/node\_modules/homey  
What is the name of the json file this token is stored in on your system?

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [January 20, 2025, 6:20am UTC](https://community.homey.app/t/homey-login-fails/128279/8 "2025-01-20T06:20:53Z")

</div>

Tokens are stored in `~/.athom-cli/settings.json`

Since you’re using a rather old version of Node.js, try using a more modern one (\>= 20).

---

<div class="post-metadata">

**Author:** ![bob\_schijvenaars](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bob_schijvenaars/32/34710_2.png) [@bob\_schijvenaars](https://community.homey.app/u/bob_schijvenaars)\
**Post date:** [January 20, 2025, 7:29am UTC](https://community.homey.app/t/homey-login-fails/128279/9 "2025-01-20T07:29:21Z")

</div>

I deleted that file, restarted terminal, upgraded node.js but that didn’t seem to help.  
So I reinstalled homey completely and that solved it (should have done that before coming here). Thanks for the help! 👍
