Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
ibutur
Frequent Visitor

A web API key can only be specified when a web API key name is provided.

Hi guys,

 

I'm trying to connect to a database on Klipfolio. I'm using my ID as explained here:

https://klipfolio-api-reference-guide.readme.io/docs/data-source-instances-data

so, it's https://app.klipfolio.com/api/1.0/datasource-instances/{id}/data

 

I'm using this as Access web content. But when I enter the API Key in the Web API area, I get the following error message:

A web API key can only be specified when a web API key name is provided.

 

What does this mean? What do I need to do?

24 REPLIES 24
nnosaj
Frequent Visitor

Silly me, actually @ericOnline's solution above worked for me as well.  It seems there is currently no direct way to use Azure AD as authentication via the UI.  I opted to use API key authentication, but did it the wrong way.  So i modified my api to have a custom request header passing the API key, and applied the steps above in my Power BI report. 

For what its worth, I just found a good explanation of what this error message is referring to. It appears that when you specify "ApiKeyName = "youapikeygoeshere" " in a PowerQuery, this message will show up. 

 

See this video at the 17:54 mark.

 

Cheers!

chrisu
Responsive Resident
Responsive Resident

It sounds like you need to specify an API key name in the headers area of Web.Contents using the advanced editor.  See Chris Webb's post on this for a good example: https://blog.crossjoin.co.uk/2014/03/26/working-with-web-services-in-power-query/.  

ibutur
Frequent Visitor

Hi, when I add APIToken to the header, I get this error:

Details: "The 'APIToken' header is only supported when connecting anonymously. These headers can be used with all authentication types: Accept, Accept-Charset, Accept-Encoding, Accept-Language, Cache-Control, If-Modified-Since, Prefer, Referer"

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.