CodeProject API Samples and Demos

Below you will find a number of Samples and Demos to illustrate how to access the CodeProject APIs. This list will be added to as we create more samples and answer questions asked by our users.

Sample Description Links
Async JavaScript using OAuth2 Client Credentials For applications that do not need to Authenticate the user because the app is not going to access user date, the application can use the OAuth Client Credential Flow. This uses the Client ID and Client Secret that the application developer registered on CodeProject. Because a web page is not a secure place to store client credentials, this is not a recommended method.
Sync JavaScript using OAuth2 Client Credentials For applications that do not need to Authenticate the user because the app is not going to access user date, the application can use the OAuth Client Credential Flow. This uses the Client ID and Client Secret that the application developer registered on CodeProject. Because a web page is not a secure place to store client credentials, this is not a recommended method.
C# Console App using OAuth2 Client Credentials Demonstrates a C# console application that gets an Access Token using Client Credentials, and then queries the server for the first page of new C# Articles and the first page of new C# Questions. Download Source
C# Console App using OAuth2 Resource Owner Credentials The following code demonstrates a C# console application that gets an Access Token using Resource Owner credentials, and then queries the server for the
  • the user's profile to get their CodeProject member ID.
  • the user's reputation to get their total points.
  • first page of the user's articles.
  • the first page of the user's questions.
Download Source
My API This is a demo of using the CodeProject v1/My API. The My API allows access to various information about the logged in user. This includes some of your Profile information, Reputation, as well as lists of your various content. The demo is based on the default SPA template in Visual Studio 2013.3. This template uses JQuery, Knockout.js, and Sammy.js to implement the SPA functionality. Bootstrap is for layout and styling.