Forum Discussion
DBirdmanAR
6 years agoRegular Visitor
Connecting PowerBI to REDCap via API with token
Hi All, I am trying to connect PowerBI to REDCap (see https://projectredcap.org/) which is a PHP/MySQL application that has an API which uses HTTP POST to allow users to pull data with a valid to...
DBirdmanAR
6 years agoRegular Visitor
It was two issues:
- I need to change to x-www-form-urlencoded
- There were serious formating errors with both the Headers and the Content
let
actualUrl = "https://bbmc.ouhsc.edu/redcap/api/",
record =[token="9A81268476645C4E5F03428B8AC3AA7B",
content="record",
format="csv"
],
body = Text.ToBinary(Uri.BuildQueryString(record)),
options = [Headers =[#"Content-type"="application/x-www-form-urlencoded"], Content=body],
result = Web.Contents(actualUrl, options)
in
result
v-lid-msft
Community Support
6 years agoHi DBirdmanAR ,
How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?
Best regards,