Tibber.com API call - help with authorization.
Hi.
I'm trying to reach my electricity company through their public API.
I'm able to use the POST field in the command to get a response but a layer of authorization is required.
Is anyone able to point me in the right direction on how to incorporate the authorization token in my call?
This call gives me a response (from their examples)
call:
{
"query": "{ viewer { name }}"
}
response:
{"data":null,"errors":[{"message":"No valid access token in request","locations":[{"line":1,"column":3}],"path":["viewer"],"extensions":{"code":"INTERNAL_SERVER_ERROR"}}]}
Documentation:
https://developer.tibber.com/docs/guides/calling-api
Any help is appreciated



In your POST, did you add the "authorization bearer" header followed by you personal token as indicated in the API :
Passing the token
The token is passed to the server through the Authorization header and must be included on every call.
A Personal Access Token give you access to your data and your data only. This is ideal for DIY people that want to leverage the Tibber platform to extend the smartness of their home. Such a token can be acquired here.
HTTP POST seem to require 2 headers :
Regards,