Forum Discussion
Connect to restful api data source multiple times
- Anonymous9 years ago
FYI we got it connecting using
let apiUrl = "https://api.secondstreetapp.com/sessions", data ="{'sessions':[{'username':'**', 'password': '**'}]}", options = [ Headers =[#"Content-Type"="application/json", #"X-Api-Key"="*****"], Content = Text.ToBinary(data) ], Value = Web.Contents(apiUrl,options), in Value
Hi Lydia,
Thanks for getting back to me, the thing is though in order to get the token you have to first POST to the api.
Its like a two step authentication. How would this translate?
let
apiUrl = "https://api.secondstreetapp.com/sessions",
options = [Headers =[#"username"="***"],[#"password"="****"]],
result = Web.Contents(apiUrl , options)
in
result
When I put in the above I get Access to the resource is forbidden and then taken to a login screen, what I am needing it to return is...
{ |
Thanks
Chris
Hi Anonymous,
What do you mean by "two step authentication"? If you refer to 2 factor authentication, as far as I know, Power BI doesn't support this auth method.
Thanks,
Lydia Zhang