Bitly API: Authentication
April 21, 2012
I was playing around this morning with the Bitly API. Like the Dropbox API they use OAuth for authentication. But instead of version 1.0 they use the OAuth 2 draft specification.
Wondering how much it differs from the previous version I created a Bitly account and started coding…
Dropbox REST API Part 6: OAuth Callback
March 17, 2012
With this entry into the Dropbox series we come back to the beginning of the cycle. We started with authentication and that’s where we’ll end.
Having a user authorize your application to access his or hers Dropbox account consists out of 3 steps. Using OAuth you must:
Before retrieving an access token you must wait until the user has authorized your application. There’s no way to determine when this has happened. Up until now we just waited a little while and hoped for the best. However, when you instruct the user to authorize your application, you can also specify a callback URL which will automatically be called when the authorization process has been completed.
Let’s create a sample web application that demonstrates this.
Dropbox REST API Part 5: File Upload
March 11, 2012
In the last part of the Dropbox series, we handled file downloads. This time I’ll show you how you can easily upload files to your Dropbox account.
To follow along, download the code of part #4 (article 66) from the download page, unzip it and open the solution in Visual Studio.
Let’s get started…
Dropbox REST API Part 4: Download a File
February 26, 2012
So far we’ve covered the following topics in the Dropbox series:
Once you are authenticated you can make API requests such as requesting your account information, creating, deleting folders…etc. One particular type of request is downloading a file from your Dropbox account. Once you’ve worked your way through the previous 3 parts this becomes trivially easy.
If you want to follow along go to the download page and download the code for the third part (article #65). Unzip it and open it up in Visual Studio.
Dropbox REST API Part 3: Create, Delete and Move Folders
February 19, 2012
In the previous part (part 2: API Requests) I mentioned that the third part would show you how to perform various folder operations such as creating, deleting and moving folders.
Well it has been a month, so let’s get to it. Go to the download page and download the source code of part 2 (Article #63). Unzip and open the solution in Visual Studio. Make sure you modify the API key and secret located in the console application (Program.cs code file). Replace the values with your own application’s key and secret.
Ready? Set? OK, let’s start with creating folders…
Dropbox REST API Part 2: API Requests
January 8, 2012
In the previous article, Dropbox REST API Part 1: Authentication, I showed you how you can obtain an access token using the Dropbox REST API and OAuth.
Once you have an access token, you can use it to access the main Dropbox REST API. Let’s demonstrate this by using some of the API’s requests such as retrieving account information and file (and directory) metadata.
It’s actually surprisingly easy. In the next part we’ll explore other options such as creating, deleting and moving folders.
Let’s get started…
Stack Exchange API
October 2, 2011
Two weeks ago I was playing around with the Stack Exchange API to see if it was easy to build a custom flair application. You know, this little guy:
How hard can it be to retrieve a user’s profile, badge count and reputation updates? Surely, Stack Exchange has an API. And they do…and it’s pretty easy to use. Let’s quickly cobble together a small sample application.
Replacing the “You have created a service” message
September 4, 2011
You all know the default page you get when you enter a WCF service’s URL in a browser (e.g. http://localhost/Service.svc). You are greeted by a blue and white (mostly white) screen that informs you that you have just created a service.
(Sorry for the Dutch localization in the screenshot.)
So apart from informing you that you have created a service (handy if you suffer from alzheimer), it also tells you where you can find the WSDL (just append ?wsdl), how to generate proxy classes and how to use these proxies.
That’s all fine, but you know all of this stuff already. Besides, you don’t want to display this message on public-facing services. Time to get rid of it.
WCF: Sharing Types Using .SvcMap
July 31, 2011
Suppose you have to create an application which consumes a couple of web services offered by a third party. For this post, let’s assume a bank offers a financial API and opted to expose it across multiple endpoints.
Imagine two simple services. One which allows you to withdraw money and another one for depositing money.
- http://localhost:8732/WithdrawalService
- http://localhost:8733/DepositService
Both of these services use a collection of types that are shared between them. How can we make sure these types are also shared on the client side?
Let’s find out…
Silverlight Asteroids Part 10: Asteroid Fragments
July 18, 2010
Time to bring the asteroids series to a conclusion. Let’s finish the game and make it a bit more interesting in this tenth and final part.
Right now when you shoot an asteroid it blows up and dissapears, but more often than not this would cause the asteroid to break into multiple fragments. Let’s modify the game and break up the asteroid into multiple parts when it gets shot.









