Skip to content

API V2 request for a Token on P1 meter fails with an 'invalid-json' error. #243

@jannegitje

Description

@jannegitje

The problem

My P1 meter with firmware_version :6.0304 should support API V2.
I verified an open 443 https port via 'nmap '.

I tried to request a token according the example in the API V2 documentation on Authorization.

command:
curl https://<>/api/user --insecure -X POST -H "Content-Type: application/json" -H "X-Api-Version: 2" -d '{"name":"local/my_func"}'

Gave in first instance the error: {"error":"user:creation-not-enabled"}
Resending the command after pressing (within 30 seconds) the button on the P1 meter, it replied with the error {"error":"json:invalid-json"}

What could be the issue here that stops my Token Request?

Note that the API V1 is still operational.
command: curl http://<>/api returned with the device data.

I could use some help here.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions