Web Servis OAuth 2.0 Token
4
●83
- 12-01-2021, 16:55:49Evet buldum restsharp ile yaptım ben şu şekildeprofweb adlı üyeden alıntı: mesajı görüntüle
static string clientId = ""; static string clientSecret = ""; static string scope = ""; static string username = ""; static string password = ""; static string baseUrl = ""; RestClient client = new RestClient(baseUrl); RestRequest request = new RestRequest() { Method = Method.POST }; request.AddHeader("Content-Type", "application/x-www-form-urlencoded"); request.AddParameter("state", "init"); request.AddParameter("grant_type", "password"); request.AddParameter("scope", scope); request.AddParameter("username", username); request.AddParameter("password", password); request.AddParameter("client_id", clientId); request.AddParameter("client_secret", clientSecret); IRestResponse token = client.Execute(request); m_token tokenModel = JsonConvert.DeserializeObject<m_token>(token.Content); - 12-01-2021, 17:12:26Çok teşekkürler, birazdan deneyecegim umarım olurOctavia adlı üyeden alıntı: mesajı görüntüle
- 12-01-2021, 17:48:44Rica ederim olacaktır bende çalışıyorprofweb adlı üyeden alıntı: mesajı görüntüle