# Access Token Not Recognised

**URL:** <https://api-discuss.freeagent.com/t/access-token-not-recognised/2191>\
**Category:** Uncategorized\
**Created:** [27 July 2020 15:21 UTC](https://api-discuss.freeagent.com/t/access-token-not-recognised/2191 "2020-07-27T15:21:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nishitcaax](https://api-discuss.freeagent.com/letter_avatar_proxy/v4/letter/n/fbc32d/32.png) [@nishitcaax](https://api-discuss.freeagent.com/u/nishitcaax)\
**Post date:** [27 July 2020 15:21 UTC](https://api-discuss.freeagent.com/t/access-token-not-recognised/2191/1 "2020-07-27T15:21:43Z")

</div>

Hi @Ewa_Lipinska,

When I am trying to get single contact details, it shows me an error “Access Token Not Recognised”. but with the same access toke I am getting everything like categories, list of contacts, company profile etc.

I am using the URL “[https://api.freeagent.com/v2/contacts/85086](https://api.freeagent.com/v2/contacts/85086)”, please let me know if something is missing. my c# coding is as below.

var nclient = new HttpClient();  
nclient.DefaultRequestHeaders.TryAddWithoutValidation(“Content-Type”, “application/x-www-form-urlencoded”);  
nclient.DefaultRequestHeaders.Add(“accept”, “application/json”);  
nclient.DefaultRequestHeaders.Add(“user-agent”, “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36”);  
nclient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue(“Bearer”, access\_token);  
var nreq = new HttpRequestMessage(HttpMethod.Get, “[https://api.freeagent.com/v2/contacts/85086](https://api.freeagent.com/v2/contacts/85086)”);  
var nres = await nclient.SendAsync(nreq);

---

<div class="post-metadata">

**Author:** ![Ewa\_Lipinska](https://api-discuss.freeagent.com/user_avatar/api-discuss.freeagent.com/ewa_lipinska/32/235_2.png) [@Ewa\_Lipinska](https://api-discuss.freeagent.com/u/Ewa_Lipinska)\
**Post date:** [31 July 2020 14:42 UTC](https://api-discuss.freeagent.com/t/access-token-not-recognised/2191/2 "2020-07-31T14:42:42Z")

</div>

Hi @nishitcaax,

Thanks for your question. I must admit it’s not outright obvious to me why your requests have failed – I’ve had a stab at getting a single contact using your code and was able to get a successful response for a contact in my test account. 🤔One thing that comes to mind is that perhaps your access token expired shortly before you tried making those requests – as you can see in our documentation [here](https://dev.freeagent.com/docs/oauth#using-the-access-token), access tokens are valid for one hour only. I notice you’ve not tried retrieving the contact since shortly after posting on the forum; could you give it another shot with a fresh access token and see if it works this time round?

Best wishes,

Ewa

---

<div class="post-metadata">

**Author:** ![nishitcaax](https://api-discuss.freeagent.com/letter_avatar_proxy/v4/letter/n/fbc32d/32.png) [@nishitcaax](https://api-discuss.freeagent.com/u/nishitcaax)\
**Post date:** [4 August 2020 09:24 UTC](https://api-discuss.freeagent.com/t/access-token-not-recognised/2191/3 "2020-08-04T09:24:43Z")

</div>

Thanks @Ewa_Lipinska, it has been resolved.
