Add a REST API as data source in powerBI with Basic auth

Viewed 32

I am trying to add a REST API to my powerBI report as a data source. The API uses Basic authentication. However, I don't want to keep my token in an unencrypted form in the query editor. Currently, I am able to make it work by using the following in Advanced Query Editor with Anonymous authentication:

let
    token = "apiKey",
    options = [Headers=[Authorization="Basic " & token]],
    Source = Json.Document(Web.Contents("https://api-url/api/v1/application", options))
in
    Source

However, I am trying to use a method, so that I can put my apiKey in the data source credentials, and eventually keep this value as private.

  1. Either as basic auth enter image description here
  2. Or as web API key enter image description here
0 Answers
Related