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.
Sam_Jain check this video, it contains everything you need.
✨ Follow us on LinkedIn
Learn about conditional formatting at Microsoft Reactor
My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
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