ERROR: appkey is incorrect 'er_invalid_appkey'
Do we have another API Key? What to find a new one?
Should I change this api application key → 93D72E60331ABDCDC7B39ADC2D1F32B3 ???
+-------------------+------------+---------------------------+--------------------------------+----------------------------------+
| FLAG | SHORT FLAG | ENVIRONMENT | DESCRIPTION | VALUE (* = DEFAULT) |
+-------------------+------------+---------------------------+--------------------------------+----------------------------------+
| --config | | GOSUNGROW_CONFIG | GoSungrow: config file. | /data/.GoSungrow/config.json |
| --debug | | GOSUNGROW_DEBUG | GoSungrow: Debug mode. | true |
| --quiet | | GOSUNGROW_QUIET | GoSungrow: Silence all | false * |
| | | | messages. | |
| --timeout | | GOSUNGROW_TIMEOUT | Web timeout. | 1m0s |
| --user | -u | GOSUNGROW_USER | SunGrow: api username. | [email protected] |
| --password | -p | GOSUNGROW_PASSWORD | SunGrow: api password. | xxxxx |
| --appkey | | GOSUNGROW_APPKEY | SunGrow: api application key. | 93D72E60331ABDCDC7B39ADC2D1F32B3 |
| | | | | * |
| --host | | GOSUNGROW_HOST | SunGrow: Provider API URL. | https://gateway.isolarcloud.eu |
| --token-expiry | | GOSUNGROW_TOKEN_EXPIRY | SunGrow: last login. | * |
| --save | -s | GOSUNGROW_SAVE | Save output as a file. | false * |
| --dir | | GOSUNGROW_DIR | Save output base directory. | * |
| --mqtt-user | | GOSUNGROW_MQTT_USER | HASSIO: mqtt username. | xxxx |
| --mqtt-password | | GOSUNGROW_MQTT_PASSWORD | HASSIO: mqtt password. | xxxxx |
| --mqtt-host | | GOSUNGROW_MQTT_HOST | HASSIO: mqtt host. | core-mosquitto |
| --mqtt-port | | GOSUNGROW_MQTT_PORT | HASSIO: mqtt port. | 1883 |
| --modbus-user | | GOSUNGROW_MODBUS_USER | Modbus username. | * |
| --modbus-password | | GOSUNGROW_MODBUS_PASSWORD | Modbus password. | * |
| --modbus-host | | GOSUNGROW_MODBUS_HOST | Modbus host. | * |
| --modbus-port | | GOSUNGROW_MODBUS_PORT | Modbus port. | 502 * |
+-------------------+------------+---------------------------+--------------------------------+----------------------------------+
[21:22:51] INFO: Login to iSolarCloud using gateway https://gateway.isolarcloud.eu ...
Error: appkey is incorrect 'er_invalid_appkey'
Usage:
GoSungrow api login [flags]
Examples:
GoSungrow api login
Flags: Use "GoSungrow help flags" for more info.
Additional help topics:
ERROR: appkey is incorrect 'er_invalid_appkey'
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
Try this link. If that doesn't help, you may need to go back to the start of that gist and work through it.
Thanks for the help.
With the key B0455FBE7AA0328DB57B59AA729F05D8, I have the error:
[20:29:13] INFO: Login to iSolarCloud using gateway https://gateway.isolarcloud.eu ...
Email: [email protected]
Create Date: Mon Jun 02 06:57:14 CST 2025
Login Last Date: 2025-06-06 04:26:59
Login Last IP:
Login State: 1
User Account: imhv2mi4nf
User Id: 686334
User Name:
Is Online: false
Token: xxxxx
Token File: /data/.GoSungrow/AppService_login.json
Error: unknown error 'Request is not encrypted'
Usage:
GoSungrow api login [flags]
Examples:
GoSungrow api login
Flags: Use "GoSungrow help flags" for more info.
Additional help topics:
ERROR: unknown error 'Request is not encrypted'
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
With the other one, ANDROIDE13EC118BD7892FE7AB5A3F20, I had "more" success, but not Authorized.
[20:26:59] INFO: Login to iSolarCloud using gateway https://gateway.isolarcloud.eu ...
Email: [email protected]
Create Date: Mon Jun 02 06:57:14 CST 2025
Login Last Date: 2025-06-06 04:08:27
Login Last IP:
Login State: 1
User Account: imhv2mi4nf
User Id: 686334
User Name:
Is Online: false
Token: 686334_e6fa3de64ad44dab9837b8d59625657c
Token File: /data/.GoSungrow/AppService_login.json
Email: [email protected]
Create Date: Mon Jun 02 06:57:14 CST 2025
Login Last Date: 2025-06-06 04:26:59
Login Last IP:
Login State: 1
User Account: imhv2mi4nf
User Id: 686334
User Name:
Is Online: false
Token: 686334_ed59b7364d24485cbbd405bf38a6bcf3
Token File: /data/.GoSungrow/AppService_login.json
[20:26:59] INFO: Syncing data from gateway https://gateway.isolarcloud.eu ...
Email: [email protected]
2025/06/05 20:27:00 INFO: Connecting to MQTT HASSIO Service...
2025/06/05 20:27:00 INFO: Connecting to SunGrow...
Create Date: Mon Jun 02 06:57:14 CST 2025
Login Last Date: 2025-06-06 04:26:59
Login Last IP:
Login State: 1
User Account: imhv2mi4nf
User Id: 686334
User Name:
Is Online: false
Token: 686334_ed59b7364d24485cbbd405bf38a6bcf3
Token File: /data/.GoSungrow/AppService_login.json
2025/06/05 20:27:00 INFO: Found SunGrow 0 devices
Error: not Authorized
Usage:
GoSungrow mqtt run [flags]
Aliases:
run,
Examples:
GoSungrow mqtt run
Flags: Use "GoSungrow help flags" for more info.
Additional help topics:
ERROR: not Authorized
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
So I have one question. Should my HM be in the same network as Sungrow?
After doing some research, I checked that HA can be on a different network. Probably my issue was my user.
I changed for one user with higher privileges. Now I see that I have several devices, but I have the : "Error: not Authorized".
`[21:20:50] INFO: Login to iSolarCloud using gateway https://gateway.isolarcloud.eu ...
Email: [email protected]
Create Date: Wed Feb 21 18:33:27 CST 2024
Login Last Date: 2025-06-06 05:17:56
Login Last IP:
Login State: 1
User Account: xxxx
User Id: xxx
User Name: x Frederico
Is Online: false
Token: xxxx
Token File: /data/.GoSungrow/AppService_login.json
Email: [email protected]
Create Date: Wed Feb 21 18:33:27 CST 2024
Login Last Date: 2025-06-06 05:20:50
Login Last IP:
Login State: 1
User Account: x
User Id: x
User Name: x x
Is Online: false
Token: x
Token File: /data/.GoSungrow/AppService_login.json
[21:20:51] INFO: Syncing data from gateway https://gateway.isolarcloud.eu ...
Email: [email protected]
Create Date: Wed Feb 21 18:33:27 CST 2024
Login Last Date: 2025-06-06 05:20:50
Login Last IP:
Login State: 1
User Account: x
User Id: x
User Name: Nilton x
Is Online: false
Token: x
Token File: /data/.GoSungrow/AppService_login.json
2025/06/05 21:20:51 INFO: Connecting to MQTT HASSIO Service...
2025/06/05 21:20:51 INFO: Connecting to SunGrow...
2025/06/05 21:20:51 INFO: Found SunGrow 7 devices
Error: not Authorized
Usage:
GoSungrow mqtt run [flags]
Aliases:
run,
Examples:
GoSungrow mqtt run
Flags: Use "GoSungrow help flags" for more info.
Additional help topics:
ERROR: not Authorized
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped`
"Request is not encrypted" is the signature of you needing to work through the gist link I sent before. Specifically Part 2 which is for Home Assistant.
Also, if you start at the top level of the this repo's issues and search for "er_invalid_appkey" or "request is not encrypted" or even the old appkey ("93D72E60331ABDCDC7B39ADC2D1F32B3") you started with, you will find other discussion around the same badic problem which may be helpful.
Please don't get put off by the title of the gist. "Compiling" the GoSungrow program was just how it began. The gist grew organically as other situations were identified. You can get past this but you do have to follow the gist.
To answer your other question, as far as I am aware, GoSungrow communicates with iSolarCloud, not your inverter. In other words, the data flow is your inverter pushes to iSolarCloud, then GoSungrow pulls from iSolarCloud. Asynchronously. That said, my inverter is on the same subnet as everything else in the house (bridged WiFi and Ethernet) so I've never actually tested a "different subnet" configuration, which is the reason for the "as far as I am aware" caveat.
I am about to talk about the iSolarCloud app. I use iOS. Your milage may vary on Android.
Most of the time when I launch iSolarCloud on my iPad I'm taken straight in. However, on occasion, it prompts me to login. When that happens I login with an email address and password.
On the first iSolarCloud screen, I tap the "Account" button at the bottom, right of the screen. The screen repaints with the "Account" tab.
Immediately below the word "Account" in the top row is my nickname plus an "owner" badge. If I click on my nickname, I am taken to a "Profile" screen.
The profile screen has fields for "Nickname", "Username", "Country/Region" and "Time zone".
In my case, the value of the "Username" is different to the email address mentioned in the first paragraph. My "Username" is a 10-character string fitting the pattern xx99xx9xxx (letters and digits). It contains no @ and no domain name. It bears no relationship whatsoever to my email address. I have no idea where the username came from. I think it was randomly generated when the installer first commissioned my inverter.
To summarise, I have three "credentials":
- email address
- password
- username
Now, here's the point. When I use GoSungrow, I use the username and password not the email address.
Whether that's necessary is something I do not know. I have a vague recollection of my first attempt to login with GoSungrow failing (likely with "not authorised"), at which point I probably wondered whether what GoSungrow called "user" was intended to be the same as what the iSolarCloud app was calling "username", tried that value, succeeded, and never looked back.
If your account is set up in similar fashion (three "credentials") then maybe this will help.
Hello, I am an installer and can contribute to the username. When a new user is created in iSolarCloud, Sungrow automatically assigns a unique user ID. Therefore, your installer has had no influence on the assignment. I assume that Sungrow uses the unique user ID for internal user management rather than the email address. Therefore, it makes sense that only the user ID works and not the email address.