Feb 6, 2018 03:48 PM
(This post was last modified: Feb 6, 2018 07:00 PM by SIM-989994.
Edit Reason: Solved
)
I'm trying to automatically login at archive.org to get the main cookie "logged-in-sig" and "logged-in-user".
Through Postman I've been configurated a POST call to the account/login.php page with the parameters "username: [email protected]", "password: password" and "action: login", it works and I get the cookie that interest me.
The real problem is when I try to do the same on C# code.
RestSharp generated with Postman
So, how is possible automatically login at archive.org to get "logged-in-sig" and "logged-in-user" cookie? Thanks
-------
UPDATE
Solved adding request.AddCookie("test-cookie", "1");
Probably a site security check
Thread can be close
Through Postman I've been configurated a POST call to the account/login.php page with the parameters "username: [email protected]", "password: password" and "action: login", it works and I get the cookie that interest me.
The real problem is when I try to do the same on C# code.
RestSharp generated with Postman
Code
var client = new RestClient("https://archive.org/account/login.php");
var request = new RestRequest(Method.POST);
request.AddHeader("Postman-Token", "32223140-xxxx-80b7-ef90-37ccdf4d77f0");
request.AddHeader("Cache-Control", "no-cache");
request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
request.AddParameter("undefined", "[email protected]&password=password&action=login", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);So, how is possible automatically login at archive.org to get "logged-in-sig" and "logged-in-user" cookie? Thanks
-------
UPDATE
Solved adding request.AddCookie("test-cookie", "1");
Probably a site security check
Thread can be close

