# C# api tutorial not working

**URL:** <https://forum.alpaca.markets/t/c-api-tutorial-not-working/12859>\
**Category:** Getting Started with Alpaca\
**Created:** [September 7, 2023, 2:19pm UTC](https://forum.alpaca.markets/t/c-api-tutorial-not-working/12859 "2023-09-07T14:19:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fairguni](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/fairguni/32/5513_2.png) [@Fairguni](https://forum.alpaca.markets/u/Fairguni)\
**Post date:** [September 7, 2023, 2:19pm UTC](https://forum.alpaca.markets/t/c-api-tutorial-not-working/12859/1 "2023-09-07T14:19:22Z")

</div>

follow carefully the officiel tutorial [Here](https://github.com/alpacahq/alpaca-trade-api-csharp/tree/develop)  
Unfortunately, `dotnet run` returns the following error:  
`Unhandled exception. Alpaca.Markets.RestClientErrorException: request is not authorized`  
(I replaced KEY\_ID and SECRET\_KEY of course)  
The Alpaca’s python API works perfectly fine to me though.  
Has anyone an idea?

Thanks!

---

<div class="post-metadata">

**Author:** ![oleg.rakhmatulin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/oleg.rakhmatulin/32/559_2.png) [@oleg.rakhmatulin](https://forum.alpaca.markets/u/oleg.rakhmatulin)\
**Post date:** [September 8, 2023, 7:39am UTC](https://forum.alpaca.markets/t/c-api-tutorial-not-working/12859/2 "2023-09-08T07:39:48Z")

</div>

@Fairguni Answered you on GitHub.

---

<div class="post-metadata">

**Author:** ![Fairguni](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/fairguni/32/5513_2.png) [@Fairguni](https://forum.alpaca.markets/u/Fairguni)\
**Post date:** [September 12, 2023, 2:52pm UTC](https://forum.alpaca.markets/t/c-api-tutorial-not-working/12859/3 "2023-09-12T14:52:04Z")

</div>

Hi,  
Thank you Oleg for your reply on GitHub.
