I have setup up a .NET console application that will do the following:

* Access the Google Contacts API for my personal Google Account
* Perform basic CRUD (create, read, update, delete) operations to these contacts

I believe executing the CRUD operations will be straight forward using the following documentation:

<https://developers.google.com/google-apps/contacts/v3/#about_authorization_protocols>

**However, my problems are occurring when trying to authenticate my connection using OAuth2.0.**

I am using the Google.GData.Contacts .NET NUGET Package using the code from the following example:

<https://code.google.com/p/google-gdata/source/browse/trunk/clients/cs/samples/oauth2_sample/oauth2demo.cs?r=1159>

```
OAuth2Parameters parameters = new OAuth2Parameters() {
    ClientId = clientId,
    ClientSecret = clientSecret,
    RedirectUri = redirectUri,
    Scope = scopes
};

string url = OAuthUtil.CreateOAuth2AuthorizationUrl(parameters);
Console.WriteLine("Authorize URI: " + url);
parameters.AccessCode = Console.ReadLine();

OAuthUtil.GetAccessToken(parameters);

```

As this code was last updated in 2012, I'm worried it might no longer be relevant for my task.

**Major Questions:**

* I'm not sure exactly what the parameters.AccessCode value is. Where does this value come from?
* Based upon my use case am I using the correct OAuth2.0 approach? You can can setup authentication for a Service Account, Web Application, or Native Application. The above code implies Native Application
* Is there a better way to handle my task?