Forum Discussion
heriberto_mb
2 years agoFrequent Visitor
PowerBI Power Query "We cannot apply field access to the type Binary"
I need a hand trying to find why I am receiving "We cannot apply field access to the type Binary " This is the function that I've defined, I've removed the token and the directory name for secur...
- 2 years ago
What's the Text.FromBinary for? Not needed.
token=Json.Document(Data)[token]
lbendlin
Super User
2 years agoWhat's the Text.FromBinary for? Not needed.
token=Json.Document(Data)[token]
- heriberto_mb2 years agoFrequent Visitor
Thank you lbendlin!
That worked, I have one more doubt...I'm getting the following error
An error occurred in the ‘get_token’ query. Expression.Error: The 'Authorization' header is only supported when connecting anonymously. These headers can be used with all authentication types: Accept, Accept-Charset, Accept-Encoding, Accept-Language, Cache-Control, Content-Type, If-Modified-Since, Prefer, Range, Referer
However, if I select to login anonymously... it wants my credentials:
My code:
let gettoken=() => let JWT="<my_token>", Data= Web.Contents("https://api.github.com/app/installations/<id>/access_tokens", [ Headers=[ #"Accept"="application/vnd.github+json", #"Authorization"="Bearer" & JWT, #"X-GitHub-Api-Version"="2022-11-28", #"Content-Type"="application/x-www-form-urlencoded" ]]) ,token=Json.Document(Data)[token] in token in gettokenIf needed I can open another post.
- lbendlin2 years ago
Super User
Have you considered using the github connector in Power Query?