Skip to content

GoSungrow fails with new Sungrow Developer API: missing required x-access-key header #140

@fpolterauer

Description

@fpolterauer

Hello MickMake,

first of all thank you for providing GoSungrow – it's a great tool and many
Home Assistant users rely on it.

I’m currently trying to connect GoSungrow with the official Sungrow
Developer API. My Developer App was enabled by Sungrow, but the login
fails with the following error:

Error: unknown error 'Missing parameter in request header: x-access-key'

This happens whenever the gateway URL is set to:
https://gateway.isolarcloud.eu
or
https://api.isolarcloud.com

From analyzing the traffic and the Sungrow documentation it seems that:

  1. The new Sungrow Developer API (V2) requires an additional HTTP header:
    x-access-key:

  2. GoSungrow only sends the "appkey" parameter (GOSUNGROW_APPKEY), but does
    not include x-access-key in the request headers.

  3. Sungrow now rejects all API calls that do not contain x-access-key.

  4. OAuth2-based login flows (Authorize URL + Redirect URL) are also not
    supported by GoSungrow at the moment, which makes the new API unusable
    with the current code.

Because of this, GoSungrow cannot authenticate against the new Sungrow
Developer API anymore and always returns 403 or the x-access-key error.

Would it be possible to add support for the new API header
(x-access-key) and/or the new OAuth2 login flow?

This would allow Home Assistant users to continue using GoSungrow with the
official Developer accounts provided by Sungrow.

If you need someone to test builds, I would be happy to provide logs,
access keys (privately), or run experimental binaries.

Thank you for your work and for looking into this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions