Forum Discussion
EPetit
5 years agoRegular Visitor
DataFormat.Error: We found extra characters at the end of JSON input
Hello, I got this problem when I connect PBI with API Rest using Web.contents() I don't understand what happened. Someone can explain to me ? Here my code : let
Source = Json.Doc...
- 5 years ago
Hi EPetit
It should be #"Authorization" in Headers
let Source = Json.Document(Web.Contents("xxx", [ RelativePath = "xxx", Content=Text.ToBinary(""), Headers=[#"Content-Type"="application/json", #"Authorization"="Bearer xxx" ] ])) in SourcePhil
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.
PhilipTreacy
Super User
5 years agoHi EPetit
It should be #"Authorization" in Headers
let
Source = Json.Document(Web.Contents("xxx",
[
RelativePath = "xxx",
Content=Text.ToBinary(""),
Headers=[#"Content-Type"="application/json",
#"Authorization"="Bearer xxx"
]
]))
in
Source
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.