Forum Discussion
Anonymous
5 years agoNot applicable
Can't refresh data because "API Key was expected to be provided in the header for this call"
I've created a dahsboard, of which the source is Lead Forensics' API (they identify businesses veiwing our wensite). In desktop I connect without any issues like this: let
Source = Json.Docume...
- Anonymous5 years ago
I have finally managed to solve the problem witrh a little bit of help from blopez11 which he posted here
let vBaseUrl = "https://interact.leadforensics.com", vPath = "WebApi_v2/Visit/GetAllVisits?datefrom=01-01-2020 00:00:00&dateto=31-12-2030 23:59:59&pagesize=999999&pageno=1", vHeaders = [#"Authorization-Token"="THIS IS WHERE I PUT THE AUTH TOKEN", #"ClientID"="THIS IS WHERE I PUT THE ID"], Source = Web.Contents ( vBaseUrl, [RelativePath=vPath, Headers=vHeaders] ), Json = Json.Document ( Source ), SiteVisitList = Json[SiteVisitList], #"Converted to Table" = Table.FromList(SiteVisitList, Splitter.SplitByNothing(), null, null, ExtraValues.Error), in #"Converted to Table"Awesome thanks, you're amazing man!
lbendlin
Super User
5 years agoWeb.Contents has an option specifically for the API Key. use it.
Anonymous
5 years agoNot applicable
can you elaborate? Am I supposed to make changes in M in desktop ?