Sample C# application for My Johndeere API
- Microsoft .Net Framework 4.6+ and Microsoft Visual Studio 2017+ (community or higher)
- Or, Mono 5.0+ and some IDE with NuGet support (tested with MonoDevelop)
- Restore NuGet packages, if necessary, and ensure the project compiles.
- Update Program.cs with appId and secret from developer.deere.com.
- Run Program.cs file to generate OAuth tokens.
- OAuth tokens are valid for one year. To continue experimenting with the sample code:
- Paste your appId, secret, oAuth token, and token secret into ApiCredentials.cs
- Comment or delete the call to oauthWorkflowExample.Authenticate(clientKey, clientSecret) in Program.cs, so you don't have to repeatedly generate new oAuth tokens.
- Add a `var apiCredentials = new ApiCredentials();` line to Program.cs to reuse the credentials you pasted in ApiCredentials.cs
- Note that in the real world you'd want to store these oAuth credentials somewhere (probably a database), and include logic to generate new oAuth credentials once you start getting HTTP 401 (Unauthorized) responses from the Deere API's.