Forum Discussion
Get authorization token from API url
ImkeF , any suggestions on this
Hi gilbertendaya ,
if you're trying to create an oauth flow in Power Query, you need to create a custom connetor, I'm afraid.
You can find some details on the auth-part here: https://docs.microsoft.com/en-us/power-query/handlingauthentication
This gives a good overview of the steps involved to create a custom connector: https://jussiroine.com/2019/02/building-a-custom-connector-for-power-bi-that-supports-oauth2-to-visualize-my-wellness-data/
- gilbertendaya5 years agoHelper IV
hi ImkeF thank you for the reply. Is there no easy way in M-query to do this?
- gilbertendaya5 years agoHelper IV
hi ImkeF and amitchandak
do you know how to convert this to M-query?{"limit": 10,"aggregate": [{"$sort": {"dateProcessed": -1}},{"$match": {}}]}This is for the body.- ImkeF5 years agoCommunity Champion
you can simply wrap it into a Json.Document-formula if you escape the quotes like so:
Json.Document( "{ ""limit"" : 10 , ""aggregate"" : [ { ""$sort"" : { ""dateProcessed"" : -1 } }, { ""$match"" : { } } ]}")If you have oauth, there is no simpler way in PQ, unfortunately.