Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello,
I am trying to connect to a Web API in Power BI Desktop. The request requires token authentication with an "api_key" parameter. I continue to get the error that an API key name must be specified in order to provide an API key, but I cannot find where to specify an API key name.
I have already tried the following and none have worked:
I have seen other posts suggesting to create a dataflow to solve this but I do not have the ability to create a dataflow.
What is the proper way to provide token authentication for a Web API?
Thanks,
Hello @adwilliams ,
I am encountering the same issue. Were you able to find a solution?
Thanks,
Victor
Hi @adwilliams ,
As the official document said, "api_key" is just an example, so it should be based on your actual URL in this format: "https://contoso.com/api/customers/get?api_key=****** "
Best Regards,
Eyelyn Qin
Hi! so "api_key" is actually the same as I need for my URL format.
Additionally, I attempted to do this just as a Blank Query in the advanced editor to bypass the Authentication in the Web API UI. I am still getting errors. Do you have any other tips on how to get this done?
There really should be a much easier way to provide auth for this...
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?
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.
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.
Have a read here Web.Contents - PowerQuery M | Microsoft Docs , specifically the ApiKeyName section.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
15 | |
14 | |
13 | |
12 | |
11 |