Forum Discussion
Anonymous
6 years agoNot applicable
Rest API Authentication API-Key
Hey guys, so I'm new into power bi and the power query m language and never worked with that. Basically I'm trying to connect a rest api with my power bi. In order to get the data, I'll have t...
Anonymous
6 years agoNot applicable
Hi Ibendlin,
do you mean that I have to put my apikey into the Json.FromValue function?
let
URL = "URL",
headers = [#"Content-Type"="application/json"],
data = Json.FromValue([apiKey = 123ABC]),
web = Web.Contents(URL,[ Content = data,Headers = headers, ManualStatusHandling = {404, 400}]),
result = Json.Document(web)
in
result
It gives ma an error, my api key is mixture of letters and numbers.
my API documentation says:
HTTP Method
POST
Query
A json object contaaining only the "apiKey" field inside.
body: {
apiKey: "xxxxx"
}
lbendlin
Super User
6 years agoyou are missing the quotes around the key
data = Json.FromValue([apiKey = "123ABC"]),