# Error api authontication

**URL:** <https://community.postman.com/t/error-api-authontication/6410>\
**Category:** Help Hub\
**Created:** [July 9, 2019, 11:52am UTC](https://community.postman.com/t/error-api-authontication/6410 "2019-07-09T11:52:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jainilsoltrack](https://avatars.discourse-cdn.com/v4/letter/j/73ab20/32.png) [@Jainilsoltrack](https://community.postman.com/u/Jainilsoltrack)\
**Post date:** [July 9, 2019, 11:52am UTC](https://community.postman.com/t/error-api-authontication/6410/1 "2019-07-09T11:52:43Z")

</div>

We are using “[https://commonapi.mastersindia.co/oauth/access\_token](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 🙂  
var client = new RestClient(“[https://commonapi.mastersindia.co/oauth/access\_token](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](http://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 😉

 ![5e32db70c777bf5bb50c103bc033ccda31343010](https://us1.discourse-cdn.com/getpostman/original/3X/5/a/5aafcec7f8026c71c8bed0f281160cc85f3dd95f.png)

---

<div class="post-metadata">

**Author:** ![Chris](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/chris/32/6637_2.png) [@Chris](https://community.postman.com/u/Chris)\
**Post date:** [July 9, 2019, 9:53pm UTC](https://community.postman.com/t/error-api-authontication/6410/2 "2019-07-09T21:53:04Z")

</div>

@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 🙂

---

<div class="post-metadata">

**Author:** ![Jainilsoltrack](https://avatars.discourse-cdn.com/v4/letter/j/73ab20/32.png) [@Jainilsoltrack](https://community.postman.com/u/Jainilsoltrack)\
**Post date:** [July 10, 2019, 5:40am UTC](https://community.postman.com/t/error-api-authontication/6410/3 "2019-07-10T05:40:31Z")

</div>

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?
