Forum Discussion
Anonymous
5 years agoNot applicable
power query Post request to Web API
Dear Community, I am trying to connect Power BI with Web Api. This one is working. let
Source = Json.Document(Web.Contents("http://api-pub.dudooeat.com/auth/getAccessToken", [Headers=[#"X-...
PhilipTreacy
5 years agoSuper User
Hi Anonymous
In your 3rd step you have
data = Source1[data]
But Source1 (the JSON) doesn't contain a record named data - that's what's causing your error.
For debugging purposes remove all steps after Source1 = ..... and make sure to remove the comma at the end of the Source1 step too. You also need to tell the query what value is the result.
You should end up with something like this
let
body = .......
Source1 = ......
in
Source1
You can now check what Source1 is actually returning and go from there.
Regards
Phil
If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.