Forum Discussion
power query Post request to Web API
Hi Anonymous
Your first step is returning a Record, not text. Click on the refreshAccessToken step andyou'll see what I mean.
So the body parameter is being set to a Record and this is throwing the error.
I can't tell you what's in the Record (its structure) as I don't actually have access to the API. But as you are trying to get the AccessToken I imagine the record will have a field in it named something like Token. You can check by clicking beside the Record as you did to see the error message.
So assuming the Access Token is in a field called Token you need to change the Headers in your second web request to
#"Access-Token-Api"=refreshAccessToken[Token]
Just match the field name from the record in the Header.
Let me know how you get on.
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.
- Anonymous5 years agoNot applicable
Hi, PhilipTreacy
I try to avoid the error and use this methods
But found another problem
When I'm in Query Editor I can see the data tables with zero issues, but every single time when I try to do Close & Apply it failed
Best regards