Error api authontication

We are using “https://commonapi.mastersindia.co/oauth/access_token”
and we have copy code from postman code clipboard for C# and paste in our application
as below , but we get display error. so please give us solution we are using .net C# 3.5 frame work.[quote=“Jainilsoltrack, post:1, topic:6410, full:true”]

code :slightly_smiling_face:
var client = new RestClient(“https://commonapi.mastersindia.co/oauth/access_token”);
var request = new RestRequest(Method.POST);
request.AddHeader(“cache-control”, “no-cache”);
request.AddHeader(“Connection”, “keep-alive”);
request.AddHeader(“content-length”, “171”);
request.AddHeader(“accept-encoding”, “gzip, deflate”);
request.AddHeader(“Host”, “commonapi.mastersindia.co”);
request.AddHeader(“Postman-Token”, “6660e603-4ba0-400a-a89b-5d4addc63162,51892a44-88bc-4d73-8cd2-326b6df1526b”);
request.AddHeader(“Cache-Control”, “no-cache”);
request.AddHeader(“Accept”, “/”);
request.AddHeader(“User-Agent”, “PostmanRuntime/7.15.0”);
request.AddHeader(“Content-Type”, “application/json”);
IRestResponse response = client.Execute(request);

error :wink:

@Jainilsoltrack – I’ve redacted some of the sensitive info you provided in your post (email/password). I’m not entirely sure if they were placeholders but it might be worth rotating/changing that info out on your end as well :slight_smile:

My problem is that when I execute code than it gives below error :

"Keep-Alive and Close may not be set using this property.Parameter name: value"

So,in this case what is solution of this error?