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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
IgorCanabarro
Regular Visitor

The credentials provided for the Web source are invalid (API Key connection)

Hello everyone!

 

I have a report and one of the data sources is a CSV string with an API key connection. Everything runs fine on PBI Desktop, but on Service the refresh keeps giving me error messages. I have looked at all related posts but any give me a clear idea of what to do in my case.

 

The source comes from:

let

Source = Csv.Document(Web.Contents("https://eco.helmconnect.com/api/v1/jobs/reports/tables/csvlink?configId=255324e3-60b1-11ea-8255-f5a3932b4801&timezone=America%2FSao_Paulo
", [ApiKeyName= "apikey"]),[Delimiter=",", Encoding=65001, QuoteStyle=QuoteStyle.Csv]),

#"Promoted Headers" = Table.PromoteHeaders(Source)
in
    #"Promoted Headers"

 

I use 3 different CSV strings as above that I merge in one table in PBI.

let
    Fonte = Table.Combine({#"Tasks year to date", #"Tasks 2020", #"Tasks 2019"}),

 

Updating and getting data in Desktop is working well.

 

The problem is when refreshing on Service:

IgorCanabarro_0-1616161943002.png

IgorCanabarro_1-1616162238810.png

 

Anyone can give me guidance on what I am doing wrong? I'm such new in Power BI Service.

 

 

 

3 REPLIES 3
Anonymous
Not applicable

Hi @IgorCanabarro ,

 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it.

 

Best Regards,
Eyelyn Qin

Anonymous
Not applicable

Hi @IgorCanabarro ,

 

Accoridng to the error message, it seems that you missed some Authentials like this:

Authorization-Token"="THIS IS WHERE I PUT THE AUTH TOKEN"

 

And I used your code to add a new query ,but a error below appeared...

3.26.3.credential.PNG

 

I have researched on this, and found a workaround, hope it could help you a little:

"In the Access web content dialog, select Basic, enter your app's API key as the Username, and press Connect"

 

Refer to :

https://dev.applicationinsights.io/documentation/Using-the-API/Power-BI

https://community.powerbi.com/t5/Desktop/Get-data-from-web-error-A-web-API-key-can-only-be-specified...

https://community.powerbi.com/t5/Service/Credential-Error-for-Excel-File-hosted-on-One-Drive/m-p/744...

 

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

lbendlin
Super User
Super User

you specify 

[ApiKeyName= "apikey"]

but apikey is not part of your URL. What's the purpose of configid?

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors
Top Kudoed Authors