Subject: RS Auth
From: Zurab Batiashvili
To: [email-masked]'<[email-masked]> <[email-masked]'>; [email-masked]
Cc: "[email-masked]<[email-masked]>" <[email-masked]>, [email-masked], "[email-masked]<[email-masked]>" <[email-masked]>, [email-masked]
Date: Thu, 14 Jan 2021 11:10:00 +0000

ვაჟა,

გიგზავნი მოთხოვნილი Key და ყოველ შემთხვევაში (შენ კი არ გჭირდება J ) გამოძახების კოდსაც

public async Task RsLogin(string AuthKey)

{

string SecretKey = "6139fbb5-81f8-6114-40c1-4420484074db";

string RequestString = string.Format("https://eservices.rs.ge/WebServices/oAuth.ashx" + "?SecretKey={0}&AuthKey={1}", SecretKey, AuthKey);

WebRequest request = WebRequest.Create(RequestString);

request.Credentials = CredentialCache.DefaultCredentials;

WebResponse response = request.GetResponse();

var vasd = ((HttpWebResponse)response).StatusDescription;

Stream dataStream = response.GetResponseStream();

StreamReader reader = new StreamReader(dataStream);

string rsResponse = reader.ReadToEnd();

var soap = XDocument.Parse(rsResponse);

XmlSerializer s = new XmlSerializer(typeof(User));

var user = (User)s.Deserialize(soap.CreateReader());

reader.Close();

response.Close();

return user;

}

ზურა