Create repoditory error 403

I want to create a git repository from an asp application use github api.

To do this, I created an application in the settings (I got the keys)
Then logged in GET https://github.com/login/oauth/authorize   scope - repo and public_repo
Got access_token using

WebClient wc = new WebClient();

NameValueCollection parameters = new NameValueCollection();
parameters.Add("client_id", id);
parameters.Add("client_secret", secret);
parameters.Add("code", code);

var response = wc.UploadValues("https://github.com/login/oauth/access_token", parameters);

next i try to create a repository

NameValueCollection parameters1 = new NameValueCollection();
            parameters1.Add("name", "test-app");

            wc.Headers.Set("Authorization", "token " + access_token);
            wc.Headers.Set("User-Agent", "Mozilla/5.0");
           try
            {
                var response1 = wc.UploadValues($"https://api.github.com/user/repos", parameters1);
            }
            catch(Exception ex)
            {
                var asd = ex;
            }

And get error 403 Forbidden.

What am i doing wrong help please.

PS

requests work

wc.DownloadString($“https://api.github.com/user”);

requests are falling 403 Forbidden

wc.DownloadString($“https://api.github.com/applications/grants”)

I’m not familiar with the .NET WebClient framework, so I’m not going to be much help debugging what might be going wrong with your code. Can you execute the request to create the repository using curl or httpie and share the result?