Forum Discussion
Anonymous
6 years agoNot applicable
Refreshing a web source with an API Key and a dynamic Authorization Token fails
Hello, i have the two following tables: Table1: let
Source = Json.Document(Web.Contents("http://my.url/", [Headers=[#"x-api-key"="XXXXXXXXXXXXXXXXXXXXX"], RelativePath="the/restofmyurl"]...
- 6 years ago
Hi Anonymous ,
Could you please try to verify the result if combine them into one query?
let TokenSource = Json.Document(Web.Contents("http://my.url/", [Headers=[#"x-api-key"="XXXXXXXXXXXXXXXXXXXXX"], RelativePath="the/restofmyurl"])), TokenValue = Table.FirstValue(Table.RemoveColumns(Record.ToTable(TokenSource),{"Name"})), Source = Json.Document(Web.Contents("http://my.url/", [Headers=[#"x-api-key"="XXXXXXXXXXXXXXXXXXX", Authorization="Bearer "& TokenValue], RelativePath="another/partoftheurl12345"])), #"Converted to Table" = Record.ToTable(Source), #"Expanded {0}" = Table.ExpandListColumn(#"Converted to Table", "Value"), #"Expanded {0}1" = Table.ExpandRecordColumn(#"Expanded {0}", "Value", {"nummer", "kennzeichen", "anschaffungsdatum", "vorname", "nachname", "einstellungsdatum"}, {"Value.nummer", "Value.kennzeichen", "Value.anschaffungsdatum", "Value.vorname", "Value.nachname", "Value.einstellungsdatum"}) in #"Expanded {0}1"
Best regards,
JirkaZ
6 years agoSolution Specialist
Anonymous This is one of the formula firewall "features". Unfortunately (or as far as I was able to find out when working with APIs) the only way around is to create a custom connector.
I'd be more than happy if somebody from MSFT stepped in and proved me wrong.