Forum Discussion
abedkhooli
9 years agoFrequent Visitor
Get data from web error: A web API key can only be specified when a web API key name is provided
I have PBI desktop Version: 2.40.4554.463 64-bit (October, 2016) and I am trying to get web data from opensensors using an API with a key. I tried several combinations in the header (one is shown bel...
mllopis
9 years agoCommunity Admin
Hi all,
In order to be able to supply an “Api Key” via the credential UI, the user’s M has to look like this:
Web.Contents(URL, [ApiKeyName="mykey"])
If the user enters a key of SECRET, this will produce a final URL of URL?mykey=SECRET
NOTE: this is not supported in cloud refresh.
With respect to other messages on the thread,
- There’s no way to set arbitrary HTTP request headers through the credential system.
- There’s no way to get arbitrary HTTP response headers
Hope this helps.
BrentonC
3 years agoHelper I
"NOTE: this is not supported in cloud refresh."
Can you point me towards the documentation that says this? I have been trying to get this working for a while, although have not come across this in the documentation. It could have saved me some time.
https://learn.microsoft.com/en-gb/powerquery-m/web-contents