I am trying to read battery SOC from the Victron VRM API on a Shelly Plug S Gen3 (firmware 1.7.5). The goal is to switch a load based on battery percentage.
Shelly can reach the internet, HTTPS works fine. The VRM API endpoint is reachable, but every authenticated call returns 401.
What I tested:
Endpoints:
-
GET https://vrmapi.victronenergy.com/v2/users/me/installations
-
GET https://vrmapi.victronenergy.com/v2/installations/{id}/diagnostics
Authentication methods:
-
Static access token from VRM Preferences → Access tokens, header:
X-Authorization: Token <token> -
Login via POST to /v2/auth/login with username/password → returns a JWT token (length 685) → follow-up calls with that token still return 401, both with
TokenandBearerprefix
The account is admin on the installation. Two other admins are also on the installation.
Question: Which endpoint and authorization header works for reading SOC on a shared/admin installation via the VRM API? Is there something specific about admin vs owner accounts that affects API access?
Any working Shelly script example would be very helpful.