Error combining parameter and custom data connector
I am trying to combine the output of a Custom Data Connector and a parameter to construct a query using the Web.Contents connector. The Custom Data Connector is used to calculate a Hmac signature and return it as a string. The code looks something like this:
Timestamp = Text.From(DateTimeZone.UtcNow()),
Authentication = CustomConnector.Contents("SomeBase64Key=", Timestamp),
BaseUrl = "https://some.apiurl.com",
Source = Json.Document(Web.Contents(BaseUrl,
[Query = [Timestamp = Timestamp, Authentication = Authentication, date = Year]]))
Where Year is the parameter with the following code:
"2018" meta [IsParameterQuery=true, Type="Text", IsParameterQueryRequired=true]
Everything works just fine in Power Bi Desktop and the Custom Data Connector works fine with Power Bi service and an On-premise data gateway. Also, just changing the paramater and passing that as a query parameter works in Power Bi Service. However when everything is put together and I try to change the paramter, I get the following error.
Failed to update parameters values.
Please try again later or contact support. If you contact support, please provide these details.
Activity ID a15bd277-cca7-428e-9f56-5ee22d45431b
Request ID c236e830-c5aa-e44b-edf8-654c669f27a8
Correlation ID 1d7d4fe2-80dc-5198-9db3-ff70e7d2d097
Status code 400
Time Tue Sep 03 2019 14:57:51 GMT+0200 (Central European Summer Time)
Cluster URI https://wabi-south-east-asia-redirect.analysis.windows.net