cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lnel
New Member

API Call Credentials Invalid

Hi, 

 

I suddenly have a 'The credentials are invalid' error for my various API calls to 2 different systems via an API key. Everything was working fine for weeks. If I try to edit the credentials, it gives me the "A web API key can only be specified when a web API key name is provided" error. 

If I try to edit the settings, it now looks like a JSON call and I cannot edit the HTTP Header or insert the API key. 

My CSV calls are working fine. I cannot rebuild the query, as it also gives me the 'A web API key can only be specified...". 

I am using a gateway and it is on. 

 

What could be the issue? Please help!

 

1 ACCEPTED SOLUTION
lnel
New Member

I managed to solve it! The datasources stopped trying to login "Anonymous" and were now on "Basic" mode.

 

After I tried your suggestion I actually got a different error: 

The 'X-SmartToken' 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, Content-Type, If-Modified-Since, Prefer, Range, Referer


Based on this error, I f
ound the solution here: https://community.powerbi.com/t5/Desktop/Remote-API-Access-to-data-source-sudden-errors/td-p/627973

 

Thanks!

View solution in original post

3 REPLIES 3
lnel
New Member

I managed to solve it! The datasources stopped trying to login "Anonymous" and were now on "Basic" mode.

 

After I tried your suggestion I actually got a different error: 

The 'X-SmartToken' 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, Content-Type, If-Modified-Since, Prefer, Range, Referer


Based on this error, I f
ound the solution here: https://community.powerbi.com/t5/Desktop/Remote-API-Access-to-data-source-sudden-errors/td-p/627973

 

Thanks!

View solution in original post

V-pazhen-msft
Community Support
Community Support

@lnel 

Please refer to the solution in this post: https://community.powerbi.com/t5/Desktop/Get-data-from-web-error-A-web-API-key-can-only-be-specified...

 

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

GilbertQ
Super User
Super User

Hi there

It would appear from what you are saying that there might be an issue with the credentials.

What happens if you try and query the API with the Key using Postman, is it successful?




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!