401 Unauthorized

The API has been working fine for a while now, but has recently been giving me a 401 unauthorized. I'm in the middle of developing a chrome plugin so I'm sure I call the API frequently. Is there a chance that I've been blocked? Or possibly a problem?

icarus75's picture

Hi Torey,

1/ Could you check the response header of the failing API call? It should mention the reason why it's giving you the 401.
2/ Could you try this example in your shell? Works for me. The gzip encoding is optional.

  1. icarus75@cirrus:~$ curl -v -X GET -H "Accept: application/json" -H "Accept-Encoding: gzip" -H "X-Version: 1.0" -H "X-Token: d8a8ab8893ea73f768b66b45234b5c3a" "https://www.flukso.net/api/sensor/c1411c6b4f9910bbbab09f145f8533b9?interval=hour&unit=watt"

Cheers,
-Bart.