Socialwg/Social API/Flickr API

From W3C Wiki


Flickr's API

Flickr users Oauth 1.0 Revision A. It had its own authentication API, which is deprecated in favor of OAuth. There is a limited permission system in place.

The API has a variety of request (REST, XML-RPC, SOAP) and response formats (REST, XML-RPC, SOAP, JSON, PHP(?!!)).

API Endpoints

Unlike some other APIs reviewed in this round, Flickr has just a few endpoints, and instead many methods.

Photo uploding

Photo uploading gets its own special endpoint, since it deals with a large amount of binary data. Unlike other endpoints, there is no method to specify, and parameters are simple query parameters on a POST.

Once you've authenticated, you can upload by POST'ing to the following URL:

The arguments are as following:

  • photo: the actual file you're uploading
  • title: (optional)
  • description: (optional) permits limited HTML
  • tags: (optional) list of tags, separated by space
  • is_public, is_friend, is_family: (optional) 0 for no, 1 for yes, says who can see it
  • safety_level: (optional) think Google "safe search"... 1 is "safe", 2 is "moderate", 3 is "restricted". moderate/restricted media may not show up in certain situations. (Might we adopt a "safety" system for SocialWG?)
  • content_type: (optional) 1 is photo, 2 is screenshot, 3 is other
  • hidden: (optional) 1 to show in global search, 2 to hide

Method API endpoints

Most other submissions are made to one or more endpoints. Unlike some other APIs reviewed, there are not multiple endpoints per function, but a few endpoints depending on what method of request the API user would prefer to submit through.

For example, if you are chooing to make REST-style requests, there is a specific REST endpoint URL to which you specify which method you are using as one of the parameters. For example:

calls the method "flickr.test.echo" with the argument "name" set to "value".

All requests are expected to be encoded in UTF-8.

Docs on various request methods:

Additionally, while not separate endpoints, users can request different response types by setting the "format" to a number of different parameters. Docs for the following response types:


See also