Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I have tried many methods to get my API to refresh in the service to no avail.
I keep getting this error message which, when I search for, I can't find anywhere.
A web API key credential is required when a web API key name is provided.
No matter what credntials I input, nothing works. Should I need to do this in the Service?
If I rmeove the ApiKeyName from my 'options' in the web.content() I get the error:
A web API key can only be specified when a web API key name is provided.
Can anyone make any suggestions or work arounds? In particular ott he first error.
Thanks
Solved! Go to Solution.
Hi @Anonymous ,
According to the error message and M syntax, it seems like you directly input API key value into the data connector.
Please try the highlight lines:
https://dev.applicationinsights.io/documentation/Using-the-API/Power-BI
Here are similar threads that you could kindly refer to:
https://community.powerbi.com/t5/Power-Query/Set-API-Key-from-Cell-Value/m-p/1127837
https://community.powerbi.com/t5/Service/API-Call-Credentials-Invalid/m-p/1262662
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.
Hi @Anonymous ,
Any updates?
Best Regards,
Eyelyn Qin
Hi @Anonymous ,
According to the error message and M syntax, it seems like you directly input API key value into the data connector.
Please try the highlight lines:
https://dev.applicationinsights.io/documentation/Using-the-API/Power-BI
Here are similar threads that you could kindly refer to:
https://community.powerbi.com/t5/Power-Query/Set-API-Key-from-Cell-Value/m-p/1127837
https://community.powerbi.com/t5/Service/API-Call-Credentials-Invalid/m-p/1262662
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.
Since you have a key, are you using Anonymous for the connection type? Please share your M code (remove/modify any key values).
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Hi,
Here:
Json.Document(Web.Contents(
"https://azapp-orca-ini-prod-func-rest.azurewebsites.net",
[RelativePath="/api/rest/v1/layers",
ApiKeyName = "code",
Query =
[ code = "<key>"]
]
))
This works in the PQE and I can access and transform the data. So, I know the key works.
Cheers,
Paul
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.