Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 error:
"Failed to update data source credentials: Web.Contents failed to get contents from 'https://interact.leadforensics.com/WebApi_v2/Business/GetAllBusinesses?datefrom=01-01-2010%2000:00:0...' (400): The Lead Forensics API Key was expected to be provided in the header for this call."
Solved! Go to Solution.
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"
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"
you may have had an active session in the desktop from a prior authentication. That won't work in the service. Provide the key as indicated.
It works in desktop (and continues working), cause i set it up. No one was using this source in the company before. But just to be sure, I have cleared all existing connections and set it up again and it works in Desktop. But not in the service.
If you click on the link I provided you will see what information do they provide i.e. Authorization Token and Client ID. They don't give you the API key name and it is not required to connect to the source.
User | Count |
---|---|
5 | |
5 | |
3 | |
2 | |
2 |
User | Count |
---|---|
9 | |
7 | |
5 | |
4 | |
4 |