Shelly + VRM API: authenticated calls always return 401 - which endpoint and header to use?

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:

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 Token and Bearer prefix

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.

Hi, why you need a vrm api? shelly can work directly on local lan true mqtt.