# C# api access error

**URL:** https://community.rapyd.net/t/c-api-access-error/58326
**Category:** ⚙️ API
**Created:** [January 18, 2023, 10:42pm UTC](https://community.rapyd.net/t/c-api-access-error/58326 "2023-01-18T22:42:41Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![globale](https://avatars.discourse-cdn.com/v4/letter/g/74df32/32.png) [@globale](https://community.rapyd.net/u/globale)
#### Post date: [January 18, 2023, 10:42pm UTC](https://community.rapyd.net/t/c-api-access-error/58326/1 "2023-01-18T22:42:41Z")

</div>

using c# httpclient the error received is {“status”:{“error\_code”:“UNAUTHORIZED\_API\_CALL”,“status”:“ERROR”,“message”:“”,“response\_code”:“UNAUTHORIZED\_API\_CALL”,“operation\_id”:“6896974b-27dc-4cf8-bc46-c3151c913276”}}

i have checked the headers, the signature, timestamp and all match Postman (which works!), i also tried running postman, copied the timestamp and salt from the request, used those in the c# request and got the identical signature so i know the sig hashing is fine, but still same error! very frustrating  
calling /v1/data/countries so no body  
any help would be appreciated

---

<div class="post-metadata">

### Author: ![Community\_Team](https://avatars.discourse-cdn.com/v4/letter/c/46a35a/32.png) [@Community\_Team](https://community.rapyd.net/u/Community_Team)
#### Post date: [January 24, 2023, 5:16pm UTC](https://community.rapyd.net/t/c-api-access-error/58326/2 "2023-01-24T17:16:56Z")

</div>

Thanks @globale, it looks like it is an unauthorized call, it may be more due to the endpoint, or base URI you are using. Yes, [List Countries](https://docs.rapyd.net/build-with-rapyd/reference/country-object#list-countries) should work in Sandbox and Production.

Just confirming your base uri/url is  
[https://sandboxapi.rapyd.net/v1](https://sandboxapi.rapyd.net/v1) or  
[https://api.rapyd.net/v1](https://api.rapyd.net/v1).

Typically if this was an issue with the signature request or headers it would come up as an unauthenticated error (`UNAUTHENTICATED_API_CALL`).

---

<div class="post-metadata">

### Author: ![juliapak](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rapyd.net/juliapak/32/1832_2.png) [@juliapak](https://community.rapyd.net/u/juliapak)
#### Post date: [January 25, 2023, 3:53am UTC](https://community.rapyd.net/t/c-api-access-error/58326/3 "2023-01-25T03:53:36Z")

</div>

yes you need the hashed header data (api key and secret) in the request. I’ll show you how i do mine, I use dart not C++ though …

 ![Screenshot 2023-01-24 at 10.51.31 PM](https://us1.discourse-cdn.com/flex016/uploads/rapyd/original/3X/c/5/c552029640956ed91e05656935f21393c295eeb9.png)  
 ![Screenshot 2023-01-24 at 10.51.50 PM](https://us1.discourse-cdn.com/flex016/uploads/rapyd/original/3X/1/2/128b62a0af37990e7dccf1db45d1fb52bd4b6b5f.png)
