powerbiclockify

Clockify API & Powerbi


I have been done the rabbit role for the last day trying to connect to the clockify API using Power Bi. (My experience with API's is minimal).

Any help to put my in the right direction would be appreciated

I'm assuming out of all my attempts this is the most correct approach.

= let
    Source = Json.Document(Web.Contents("https://api.clockify.me/api/", [Headers=[Accept="application/json", Authorization="X-api-key xxxxxxxxxxxx"]])),
    messages = Source[messages]
in 
    Source

I keep getting this error:

Expression.Error: The 'Authorization' header is only supported when connecting anonymously. These headers can be used with all authentication types: Accept, Accept-Charset, Accept-Encoding, Accept-Language, Cache-Control, Content-Type, If-Modified-Since, Prefer, Referer


Solution

  • You authorization header seems to be wrong. Instead of using:

    Authorization="X-api-key xxxxxxxxxxxx"

    use:

    X-api-key="xxxxxxxxxxxx"