Forum Discussion
Anonymous
5 years agoNot applicable
API Key was expected to be provided in the header for this call
I've connected my dashboard to a source as explained by the provider here and it loads the data and refreshes fine in desktop. But when I upload it and try to shcedule a refresh it gives me this erro...
- Anonymous5 years ago
The solution to this problem was changing the M Query as below:
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"
Anonymous
5 years agoNot applicable
The solution to this problem was changing the M Query as below:
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"