I want to send a POST request using Power Query to a website that I access via Facebook authentication. I manage the request to work, but I get access denied. I assume I need to go to login, somehow, but I do not know how to do it. The website I want to access does not have API.
This is the code I used:
let
url_name = "https://www.futmondo.com/2/championship/teams",
headers = [Accept="*/*", #"User-Agent"="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36",#"Content-type"="application/x-www-form-urlencoded"],
bod ={[championshipId = "XXXXXXXXX" ]}{0},
BuildQueryString = Uri.BuildQueryString(bod),
Source = Json.Document(Web.Contents(url_name,[Headers = headers,Content=Text.ToBinary(BuildQueryString)])),
answer = Source[answer]
in
answer
And this is the response I get at that moment