"Authorization denied" attempting to connect to paper API via official .net C# SDK

My code is as follows:

            _dataClient = Environments.Paper.GetAlpacaDataClient(new SecretKey(apiKeyId, secretKey));
            _tradingClient = Environments.Paper.GetAlpacaTradingClient(new SecretKey(apiKeyId, 

After that, pulling my account information will throw “Not authorized”

        private async void Test()
            var account = await _tradingClient.GetAccountAsync();

Everything works fine if I change the environments to Live, but I am interested in the paper to test my algorithms. Thank you.

Paper and live environments have different API key/secret pairs. You are unable to one Live pair on the Paper environment and vice versa. Your code looks correct but the values used for the SecretKey object creation should be for the Paper environment.