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?
Have you followed Getting Started | Homey Apps SDK ?
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?
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
Are you logging in as admin (“Owner”) user? What type of Homey do you have?
I’m logging in as owner (is that admin?)
It’s a 2019 pro model
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?
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?
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).
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!