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!
Hi,
This happens because your connection is not set to Web API type.
In Power BI Service, the API key box only appears if the data source is using Web API authentication. If it was set up as Anonymous or something else, you won’t see the API key field.
Simple fix:
- Go to Settings → Dataset → Data source credentials
- Click Edit Credentials
- Click Sign out / Clear permissions
- Connect again and choose Web API
- Enter your new API key
If it still doesn’t show:
- Open the file in Power BI Desktop
- Go to Data Source Settings
- Clear permissions and reconnect with the new key
- Publish again
Most of the time, just clearing and reconnecting fixes it.
Hope this Helps!!
Thanks!
Thank you for the info. When i do this, I get the following error:
"A web API key can only be specified when a web API key name is provided"
Any suggestions?
- SamInogic4 months ago
Super User
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!