Bitly API: Authentication

April 21, 2012

Introduction

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…

Read the rest of this entry »

Advertisements

IntroductionDropBox Logo

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:

  1. Retrieve a request token
  2. Have the user authorize your application
  3. Retrieve an access token

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.

Read the rest of this entry »

IntroductionDropBox Logo

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.

Solution Explorer

Let’s get started…

Read the rest of this entry »

IntroductionDropBox Logo

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.

Read the rest of this entry »

IntroductionDropBox Logo

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…

Read the rest of this entry »

IntroductionDropBox Logo

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…

Read the rest of this entry »

Stack Exchange API

October 2, 2011

Introduction

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:

Flair

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.

Read the rest of this entry »