var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, "https://id.nes.com.tr/connect/token"); var collection = new List>(); collection.Add(new("grant_type", "password")); collection.Add(new("username", "KULLANICI_ADI")); collection.Add(new("password", "PAROLA")); collection.Add(new("client_id", "mobile-app")); collection.Add(new("scope", "openid profile roles IdentityServerApi")); var content = new FormUrlEncodedContent(collection); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync());