Forum Discussion
Updating API Key
- 4 months ago
Hi,
That error means Power BI is expecting both a key and a key name, not just the value.
In Power BI Service, when you choose Web API, it needs:
- Key → your API key
- Key name → the parameter/header name the API expects
For example:
- If your API uses ?api_key=XXXX → key name = api_key
- If it uses ?key=XXXX → key name = key
What to do:
- Go back to Edit Credentials
- Select Web API
- Enter:
- Key = your API key
- Key name = the parameter name used by your API
Once both are filled, the error should go away.
Hope this helps.
Thanks!
Hey
My guess is that you don't see the API Key in Edit Credentials because its not stored there, it's hardcoded in the dataflow's M query. That dialog only shows a key if the source was set up with Web API auth. If it's Anonymous, nothing shows.
To update it, edit tables, open the query, go to Advanced Editor, and update the key inside the Web.Contents call, either in the URL or headers. Then save and refresh.
If you want it manageable via Edit Credentials next time, switch to Web API auth using ApiKeyName and re-enter the key there.
Also make sure you’re editing the dataflow itself, not a dataset by mistake.
If that was helpful please give a thumb up and mark it as resolved.
Thank you 😊
- mhundley4 months agoNew Member
Thanks for the info. When I try to do this, it is telling me I have invalid credentials and takes me back to enter them in Data Source Settings window. Any ideas?