Forum Discussion
Connect API with Header ApiKeyName not going through
- 8 years ago
Perhaps this might work too:
I am not an expert, but my quick research suggests that the header name should be "X-API-KEY" and its value being API-KEY. Now you have header name "Authorization" and value "X-API-KEY:YOUR_KEY".
Try something like this
let
Http_query = Json.Document(Web.Contents("<Your URL>",
[Headers=
[X-AP-KEY ="<Your API KEY>"]
]
)),
Data = Http_query{0}
in
DataLet me know, if it works. I think this is the right direction.
Perhaps this might work too:
- jasonfordx8 years agoHelper II
A new message because I want to clarify something here. IT WORKED Michal!!!. One thing only, its case sensitive. So for some reason, Ive tried x-api-key and DID WORK instead of X-API-KEY. Thank you God and this community.
Ty Michael.
Have a wonderful week everyone :).
- Michal_cwiok8 years agoResolver II
jasonfordxThis is great! Thank you clarifying that it is case sensitive!
Would it be possible for you to paste the M/Power Query code from advanced editor? This would be helpful for solving future problems. Thanks!
- jasonfordx8 years agoHelper II
Yes, off course. It is working like this:
let
Source = Json.Document(Web.Contents("URL", [Headers=[#"x-api-key"="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"]])),
#"Converted to Table" = Record.ToTable(Source)
in
#"Converted to Table"