Forum Discussion
Web API Key Authentication
Hi- I have tried that, I have started a blank query and input Web.Contents("my api URL", [ApiKeyName="api_key"]) and saved it, and tried to Get Data from Web using the same api URL and selecting Web API inputting my key in the box.
I still get the warning that I need to specify an API key name. Could it be that it is not specified in the right editor? Is there any where else to pass this auth?
- lbendlin4 years agoSuper User
see if this thread helps
A web API key can only be specified when a web API... - Microsoft Power BI Community
Note the Auth trick.
- Anonymous4 years agoNot applicable
I tried the auth trick by putting the api_key in the URL as a parameter and selecting Anonymous, that did not work. I received the error that I have invalid credentials but when I test my call in Postman with the same api key, it is fine.
This is the query I have currently: which is still giving me the error that I have invalid credentials.
- MartySchlafer1 year agoRegular Visitor
Three years late, but for posterity and accuracy... the code above is actually two PQ applied steps returning the first step. The second step is named ApiKeyName with literal text value "api_key". This should have placed inside the 2nd parameter as a field of a record. Hence...
Web.Contents("https://.......", [ApiKeyName="api_key"])