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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
appsac1
Helper I
Helper I

Trouble with an API that requires a key

So I am having trouble with an api that require a key.  In Power BI I go to det data from web, I enter the api web address/query hit ok. Then I hit Web API I enter my key then hit connect.  The error message I get says A web API key can only be specified when a web API key name is provided.

 

The documentation for the api I am using says the following "Please note that API keys should be supplied with "Bearer " prepended (e.g. "Bearer your_key")"  So I have tried just my key by itsel in the key space and I have tried Bearer then my key (I tried with and without quotes around my key) but I get the same error message.  Very novice at using Power BI to get API data so any help is appreciated.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @appsac1 ,

 

I think you can try "Advanced" function in Web connector. Add Authorization in Http request header and then add Bearer token into the checkbox, it looks like below.

RicoZhou_0-1656057328270.png

For reference:

Bring Data In Power BI Via APIs Using Basic Authentication

Here is a solved post with similar requirement like yours, I hope it could help you solve your problem.

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
appsac1
Helper I
Helper I

Thank you this worked for me.

Anonymous
Not applicable

Hi @appsac1 ,

 

I think you can try "Advanced" function in Web connector. Add Authorization in Http request header and then add Bearer token into the checkbox, it looks like below.

RicoZhou_0-1656057328270.png

For reference:

Bring Data In Power BI Via APIs Using Basic Authentication

Here is a solved post with similar requirement like yours, I hope it could help you solve your problem.

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.