Hello,
I want to post the following json code to the tibber web api. The web api expects a GraqphQL query, but there is an example on the tibber website, how to send the request in json format.
The header shall contain
Authorization: Bearer 5K4MVS-OjfWhK_4yrjOlFe1F6kJXPVf7eQYggo8ebAE"
Content-Type: application/json
The json code for the query shall be
{ "query": "{viewer {homes {currentSubscription {priceInfo {current {total energy tax startsAt }}}}}}" }
My code is as follows:
I get the response code 400, response type: application/json; charset=utf-8{"errors":[{"message""GraphQL operations must contain a non-empty 'query' or a 'presistedQuery' extension.","extensions":{"code":"INTERNAL_SERVER_ERROR"}}]}
The header seems to be ok, as I don't get a authentication error.
What am I missing, so that I get this error message?