Forum Discussion
Web API connection
- 4 years ago
Hi Sam_Jain ,
hard to tell, quickly went through all the other answers here without checking all the links and details.
So I assume that you're using anonymus authentication with the key?
If that's not working, I would recommend to compare the generated queries by Postman and PBI using Fiddler or any other tool.
See where the queries differ and try to adjust accordingly.
Hello parry2k
While researching upon the topic i had come across this video. Sadly, i can't seem to take much out of it.
I tried the section where i include the API key name in the M code itslef and when asked for authentication i entered the key value, this time it let me through without the "an API key value needs to be specified error" which occurs when i use the direct web connector. However as soon as it said connecting to xyz.com i got a second error which reads "Expression error: access to the resource is forbidden" i have tried clearing the permissions and it still is on the same error.
The Mcode is as follows:
Source = Web.Contents("https://api.xyz.com/page-metrics/get",[ApiKeyName="x_api_key"])
Also, it is a static key that i have!
Any inputs to overcome this?
Thanks