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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
ban102763
Frequent Visitor

getting error message A web API Key can only be specified when a web API Key name is provided

Hi,

 

when i am connecting API in powerbi desktop and getting error message "A web API Key can only be specified when a web API Key name is provided" 

i have added all the manadatory headers like Authorization:  &  Apikey: your apikey

 

but still getting error, could be some one help me to resolve the issue

4 REPLIES 4
Anonymous
Not applicable

Hi @ban102763 ,

 

The "A web API Key can only be specified when a web API Key name is provided" error typically occurs when the API key name is not properly defined in the request configuration.

 

In some cases, you may want to provide separate URL header data.

 

In this case, select the Advance option in the Web dialog box.

vhuijieymsft_0-1709776457582.png

 

The Bearer your_api_token_here section is the value of the Authorization header, where Bearer is a common authentication scheme, followed by the actual API token.

 

If you want to learn more about this, please see the following documentation:

Connect to a webpage from Power BI Desktop - Power BI | Microsoft Learn

Power Query Web connector - Power Query | Microsoft Learn

 

If you have any other questions please feel free to contact me.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

Hi,

Thanks for response, i tried same thing also but got error "A Web API Key can only be specified when a web API key name is provided."messgae, colud help me on these.

 

because its pending since 1 month 

 

Hi @ban102763, did you ever figure this out? I am having the same issue and google is bringing me to this forum. None of the solutions work.

Hola, lo resolví agregando la apikey en la URL de conexión:

spinto_0-1729713486935.png

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.