Forum Discussion
DanT1994
2 years agoHelper I
Connect to Web API with custom header
Hi, I'm getting the following error when trying to connect a web API. Using an online API testing tool, my URL and custom header looks like this: So, I'm maybe simplifying this too m...
- Anonymous2 years ago
HI DanT1994,
Perhaps you can try opt use following code to use web connector getting data with apikey in anonymous mode:
let url="xxx.xxxxxx.com", apiKey = "key", headers = [ #"CLICDATA-API-KEY" = apiKey, #"Content-Type" = "application/json" ], path="/api/xxx/xxx", request = Web.Contents(url, [ Headers = headers, RelativePath= path]) in requestUsing The RelativePath And Query Options With Web contents
Regards,
Xiaoxin Sheng