Blogger Developer Group

The latest updates on Blogger developer tools

Sunday, September 22, 2019

The future of blogging APIs?

Sam Ruby and friends have been working on a new format and API for content syndication and editing. Visit the Log Format Roadmap to view the details and current supporters of this effort. We at Blogger would like to cast our vote in favor of this process and commend Sam on his efforts. We are spending a considerable amount of time thinking about how this will integrate with Blogger and plan to become more active participants in the discussion. We have the utmost faith that with his direction this will become a format and API that we will support in our current and future product line.

Blogger API Update 2020

Here is an update for developers interested in writing tools that integrate with Blogger.

First, a little background: As you may know, the original Blogger API was put up almost two years ago, with the disclaimer that it was in an "experimental" and "alpha" state with no guarantees about its future. It was designed hastily by myself in a couple days, and we had very little resources to do much with it at the time.

Despite these drawbacks, people built cool stuff and other blogging tool vendors supported the Blogger API for compatibility.

It is now (past due) time to do a major revamp of our API. In fact, we've been working on the next version for quite a while. We posted a preliminary spec to our developers list late last year and got a lot of feedback. But we were not that confident in the direction and still didn't really have the extra cycles necessary to put into to it—until recently.

As the first post to this blog (which also inaugurated this new developer's section of blogger.com) indicates, we became very interested in a new proposal that has recently been in the works by a bunch of smart engineer-types of the blogging world. We felt, if it worked out, this new spec (code-named "Atom"), would solve a lot of potential problems with our API, as well as with the blog syndication format we support, RSS. It would do so in an elegant way, specifically designed for blogging. And, even better, a way that was unified with other major blogging tool vendors.

Consequently, our developers got involved with the Atom project to make sure we felt it would work for our needs, as well as everyone else's. We are very pleased with the technical progress made so far and are committed to help the project reach conclusion.

What this means for Blogger developers:
  1. We will continue to support the Blogger API 1.0. (Technically, we are supporting it for the first time—as in, taking off the disclaimers and making sure it is up and running more reliably.) In fact, we have written a new implementation of it, along with the new, more robust, Blogger codebase. However, that spec is frozen and will not be developed further.
  2. We will not be implementing or supporting the Blogger API 2.0.We apologize for having that out there in a semi-final looking spec for so long. We know it was frustrating for developers. But please forget that ever happened.
  3. We are moving away from XML-RPC. If you choose to take advantage of the capabilities of the new API, you will need to use SOAP instead of XML-RPC. This was a difficult decision (made collectively by the designers of Atom), because there is a lot of investment in XML-RPC in the blogging tool space, and it is great for getting things done quickly. But we felt the technical advantages offered by SOAP were worth the effort. (See SixApart link below for details.)
  4. The syndication format and API format will be unified. This is one of the nice aspects of Atom that could not have been easily accomplished without starting from scratch. It generally simplifies getting data into and out of blogging apps.
  5. Interoperability. This is a biggie. At least two other major blogging tool and service companies (SixApart and Live Journal) have pledged their support for this new initiative, and we're working with them (as well as others) to define the spec up-front. This means your tools will be usable by as many people as possible, with minimal effort. And since the API/format will be vendor-neutral, no one's needs can be more important than users and developers.

In general, our goal is to make it as painless as possible to develop neat stuff that plugs into Blogger, and we feel we are very close to having the best direction for that to happen. The technical folks in the blogging world have learned a lot of the past few years about RSS and the blogging APIs—about what works well and what doesn't. And, despite the efforts that have gone into certain directions, we feel it'd be unfortunate this early in the game to be married to a certain direction just because we started out that way when we didn't know as much.

As mentioned, the project is still in the works, and there is no final spec, but there are lots of smart people working on getting it right. And it's an open process: You can get involved by visiting the wiki, posting to your blogs and mailing lists, etc.

Lastly, I didn't go into much of the technical reasons behind the decisions in the Atom project here. But they have been well-articulated by Ben Trott of SixApart. I encourage checking out that if you're interested.

Thanks for your patience (and contributions) in getting this all worked out.

[originally posted by Ev]

Proposal for post creation request

Misha has put up a proposal on the new API wiki for how a post request might work. Feedback welcomed there.

[originally posted by Ev]

Atom feed limited beta

Since the Atom syndication format is nearing a spec revision, we thought we should point to examples of the feeds we are currently planning to output via Blogger. Some of the Blogger team members have graciously agreed to use their personal blogs as Atom syndication test blogs, below are a handful for testing purposes. Please remember that these are not the final output, probably close though, and should validate at FeedValidator.org. Enjoy and please leave any comments on the Atom-syntax list.
Next step: Atom syndication for you!

[originally posted by Shellen]

Blogger gets AtomEnabled

Today, we launched support for Atom in Blogger. This means that all Blogger users now have the ability to syndicate their blog content in a rich XML format (see What is Atom?). In addition, we have rolled out beta support for the Atom API. This means a more robust API for you to use in creating new blogging applications. Some of the benefits of the new API are:
  • support for titles
  • tighter integration with the
    syndication format and editing tools
  • extensibility
  • easy-to-use WSDL file to work with most SOAP toolkits
  • higher security authentication using WSSE
  • more robust Blogger endpoint
  • support for SOAP and REST
More documentation will follow in the next few weeks as the Atom API moves to version 1.0. In the meanwhile, you may want to try the SOAP Atom API client in C# and this WSDL file. You should be able to drop this WSDL file into most developer tools. You can test this client against our Atom API endpoint at: http://www.blogger.com/atom/. You should enter the endpoint where it currently says http://localhost/AtomApi.asmx in the WSDL. For more general Atom information visit AtomEnabled.org.
As always, feedback and comments are appreciated.

[originally posted by Shellen]

APIs and SSL

Remain calm and do not panic. We're switching to a more secure Google-wide account system. What does this mean? Basically, it means that our APIs are all going to be available over SSL. We're not turning off the old API endpoints, but tools not using SSL won't be able to send usernames and passwords over the clear. Which pretty much means they will seem broken.

The good news is, we're not just gonna leave you hanging. We're building a special PIN system for use with non SSL tools. Blogger 1.0, 2.0, and Atom 0.3 are all going to be available over SSL. Since our Atom 0.3 support is still beta, we will switch to only support HTTP Basic Authentication over SSL. As our Blogger API support is considered stable, we will support both regular passwords over SSL and a new PIN system over non-SSL connections.

So users of non SSL tools will be able to visit Blogger.com and get a special password but you'll agree this is not optimal. What we recommend and encourage is that you, gentle Blogger developer, switch to an XML-RPC toolkit that can do SSL and make the appropriate changes to your fine offerings.

We're planning on initiating this move in a few weeks and we'll work to make sure our user base understands what's going on as well. We'll keep you updated on the BDN blog with any significant news. Please accept our apologies if this switch messes up your weekend or causes you any trouble but ultimately, it's for the best--think of the
possibilities!

[originally posted by Shellen]

BuzzNet Developers

Our friends over at BuzzNet recently launched their Developer Network. Along with the usual stuff (docsfeed list), they've also got a nice Community Wishlist of apps & tools for folks to hack on. We're assembling a similar list for Blogger's API — stay tuned for details.

MarsEdit to get Atom API support

Atom support for the excellent MarsEdit is on the way, according to Brent:
"MarsEdit doesn’t yet support titles for Blogger."

"It will—but it requires implementing the Atom weblog editing API first. This is MarsEdit’s top priority."

Nokia Lifeblog spec

The Lifeblog Posting Protocol spec is available for download from Nokia:
"This is the technical document that explains how we use Atom to post multimedia content online. Use this document to figure out how to adapt your servers to use Lifeblog 1.5."

Desktop Clients Updated

Marcelo Cabral just updated w.bloggar to v4.0, and Dmitry Chestnykh released BlogJet v1.5 — both now support SSL for posting to Blogger blogs.

Atom API Update

A long-overdue Atom API update just went live. Aside from lots of bug fixes, full i18n support is present via UTF-8, and authentication now works securely via Basic HTTP Auth over SSL at the Atom endpoint: https://www.blogger.com/atom

Documentation is live too, and feel free to post to the BloggerDev list if you need technical assistance. Be sure to search the list archives first however, in case your issue has already been addressed. Note that Post Titles now work seemlessly via the API.

We've already been testing an updated version of Adriaan Tijsseling's Ecto, and we'd love to hear from anyone else making progress with their Blogger/Atom apps. You can email us at support AT blogger.com, subject=BDN.

Thanks for your patience as we've worked on shipping this API milestone!

Ecto

Nice! Adriaan just released an updated version of Ecto for both Mac and Windows, which supports SSL authentication.

Google Code 2020

Google Code launched today; here's DiBona's Google Blog post:
We're very happy to be launching code.google.com today. To begin, we're releasing some developer-oriented libraries and tools. Google developers use these every day to make their programs easier to debug, faster, and more reliable. A number of engineers have used their 20% time to ready these tools for release, and will also help build the communities we hope will form around them.

We're also featuring links to all current Google APIs. Come check them out and if you'd like more information, please join our group, subscribe to our feeds, or if you're shy, email us directly. And happy coding!

43Things API

Our friends at The Robot Co-op just released Web Services. for 43Things. Fun!

PocketBlogger Updated

Steve Novoselac just wrote in to let us know that PocketBlogger's been updated to support Blogger's Atom API and secure authentication via SSL.

PocketBlogger is a PocketPC Blogger client.

Zoundry Updated

We just heard from Lawrence Lee of Zoundrythat their Blog Writer app has been updated to support SSL and Blogger's AtomAPI. It's a Windows app for doing WYSIWYG blogging from the desktop.

JavaScript Blog

Scott Andrew is blogging all about AJAX and JavaScript at The Strange Zen of JavaScript. Just added it to the blogroll...

[via PhilR]

Textamerica API

Another webapp/blogging API with which to tinker: Textamerica Developer API

FotoFlix

The folks at FotoFlix just wrote in to let us know that they've added Blogger support to their photo-sharing site.
"We are very excited to offer this service and Blogger is the first blogging site which we are supporting directly using an API... We are anticipating for it to be well received due to it's uniqueness and simplicity."
It's great to see innovative new Atom API uses from the web community!

RadioAtomBridge

Scott Lemon just wrote in to let us know he's released RadioAtomBridge, a tool that enables Radio Userland to post to Blogger blogs:
"A while back I realized that I really wanted to use Radio to be able to post to some of my blogs that are hosted at Blogger.com and Blogspot.com..."

"So this is it ... the new and improved RadioAtomBridge Tool ... a derivative of the xManilaBloggerBridge Tool which was a derivative of the ManilaBloggerBridge Tool. I'm giving all of this code to Userland to incorporate this into a future version of Radio."

API from FeedBurner

Dick just announced FeedBurner's Feed Awareness API, which "enables any 3rd party to query feed statistics on FeedBurner feeds."
"AwAPI uses a straightforward web-based protocol to receive requests and return data. Known as REST, it allows anyone to request feed traffic data using URLs submitted via HTTP. The data is returned as plain text XML which can be repurposed, transformed, and displayed by applications that you build. Using XML as the output format means testing and exploring AwAPI is as simple as composing an AwAPI URL and then requesting it with a web browser."

EVDB API

EVDB just launched their API.

I like Step 3: "Go make something cool!"

PowerBlog

Jon Davis just wrote in to let us know that PowerBlog (a Windows-based desktop blogging client) has gone Open Source:

http://sourceforge.net/projects/pwrblog/

Two Minor Updates

We've just added two new sections to Blogger's Atom API documentation:

Draft is what you'd expect it to be. Extensionsis where we'll be documenting Blogger-specific additions to the API, such as Line Break Status (the only one listed at the moment).

Please post any questions or comments to bloggerDev.

BlogMarks support

François Hodierne recently implementedBlogger Atom API support on blogmarks.net:
"The good news is that this PHP/PEAR implementation is open source and immediately available. Be careful, this is not very seriously tested."

You can get it from here:

API of the week!

FeedBurner just announced their RESTful Feed Management API:
Tired of coming to FeedBurner to analyze your stats? Use the API. Tired of "logging in" via a "browser" to "edit" your feed "settings"? Use the API.

What can't you do with the API? Nothing, with one exception. The API has a built-in limit of 20 burned feeds per user id. We will ratchet this down even lower if it's abused, but that seems like a reasonable number to get started.

Photolightning

Our friends at Photolightning just released their latest version, which incorporates some nifty Blogger functionality — it can post photos to blogs, which can then be purchased at ClubPhoto. Here's an example blog with some Photolightning posts.

PHP Atom API Code

In case you're ever looking for example code for posting to Blogger's Atom API from PHP, see this post on bloggerDev: "Working PHP code to post to Blogger"

PHP Atom API Library

Beau Lebens recently informed bloggerDevthat he's posted a PHP library for interacting with Atom APIs (like Blogger's): http://dentedreality.com.au/phpatomapi/

Blogger + Emacs = Crazy Delicious

(sorry, I've been fully infected)

emacsgeek:
"Announcing atom-blogger.el atom-blogger.el found at atom-blogger.tar.bz2 is a light-weight Emacs client for posting and editting blogger.com entries. It uses curl to handle the HTTP side of the blogger ATOM API, and relies on Emacs' support for editting XML --- either via nxml-mode or Emacs' vanila xml-mode."
[via bloggerDev]

Blogger API Update

Hi folks,

Just posting to let subscribers to this blog's feed know that new Blogger/GData documentation is available on code.google.com; please stay tuned to the bloggerDev discussion list for updates.

Thanks,
-Eric and the Blogger Team at Google

Reporting and tracking Blogger API bugs

Hopefully, you’re really enjoying the Blogger API and the flexibility of being able to post to your blog using your own custom software. Sometimes things don’t work quite the way you’d expect or like and we want to hear about it.

If you find a bug in our Google Data API implementation, or something that we could do better, please file an issue in our tracker.

We use this to keep track of issues with all of the Google data APIs, so be sure to mention that you’re talking about Blogger when writing your description. While you’re at it, I’d like to hear about it on the discussion group too.

We’re going to start coordinating this external issue tracker with our internal development, so we’ll update the relevant issues if we ship fixes to them.

Blogger JavaScript Client Library Released

Paul McDonald just announced the new Blogger JavaScript client library over on the Google Data APIs Blog:
The Blogger GData JS Client library enables developers to read and write blog posts using calls to our JavaScript library. This is a full client library, with support for authenticated access to private data and read-write capabilities. Now you can create Blogger applications and mashups that can read and write data from your Blogger blogs. No server-side programming is required. Your application can run on any domain, too. No proxying is required.
We have a new developer guide for JavaScriptand some code samples to give you ideas and get you started.

Atom Publishing Protocol Interop Meeting, November 13–14

Blogger and Google Data API developers will be participating in the November 2007 Atom Publishing Protocol interoperability meeting, happening this coming Tuesday and Wednesday, November 13–14. This is a chance for implementers of servers and clients to squash any remaining bugs in their APP code to make sure that they match the upcoming standard.

Take a look at the wiki page for instructions on how you can participate!

Feeds now include Media RSS thumbnails

With the most recent release of Blogger we’ve added Media RSS <media:thumbnail>elements to both Atom and RSS feeds.

The <media:thumbnail> element links to a 72x72 pixel version of the first image in the post. Only images uploaded through Blogger to PicasaWeb are available as thumbnails.

We hope that you’ll be able to find fun uses for this new element. We’ve added thumbnail support to Blogger’s Blog List page element as a new option: Blog Lists can now display the most recent thumbnail from Blogger and other Media RSS–enabled feeds.

Bug Fixes for October 1

We released a few bug fixes tonight for regressions introduced last week:
  • Issue 795: Blog metafeed did not contain rel="self" links in entries. This had the even more unfortunate side effect of breaking some of our sample code, which was using these links to derive blog IDs.
  • Issue 798: Query parameters were being repeated in the rel="next" and rel="prev" links in feeds, leading to invalid duplicate parameters.
  • Issue 803: Unable to fetch blog documents.
We apologize for these regressions, and hope that they’ve been fixed satisfactorily.

Google Blog Converters 1.0 Released

JJ writes on the Open Source at Google blog:
Blog authors around the world, Google would like to remind you that it's your blog, your data. Now that Blogger allows users the ability to export all contents of their blog, the Data Liberation team would like to announce the Google Blog Converters project. This new Open Source project provides the ability to easily move blog posts and comments from service to service. This initial release provides Python libraries and runnable scripts that convert between the export formats of Blogger, LiveJournalMovableType, and WordPress.
Give it a spin. We’ve also released templates to run the converters on Google App Engine.

Bug Fixes and Changes for 3/12

Last night we pushed two Blogger Data API bug fixes:
With these fixes you should see more reliable results for authenticated and V2 feeds.

We have also started to include a <div class="blogger-post-footer"> in each feed entry’s content element. Apologies if this has disrupted your app. We’re working on preventing this from appearing in authenticated requests, and that fix should be rolled out early next week.

API clients can and should in general ignore the “blogger-post-footer” element however, as it will be present if a blog admin specifies a Post Feed Footer in Settings > Site Feed.

Bug Fixes for 6/15

Late last week we fixed a few bugs in Blogger’s Data API implementation:
  • POSTs to the feed on the blog’s domain (rather than www.blogger.com) now correctly return the entry XML in the 201 response. This was the cause of a variety of strange errors, particularly when using the client libraries.
  • Posts created via the API now correctly reflect the blog’s “Comments Default for Posts” setting. [Issue 1242]
  • The tracker image in feed entries is now consistently served over HTTPS, instead of leaving the scheme relative, to fix a crash with Microsoft Outlook.
Having a reproducable problem? Please file a report in the issue tracker and we’ll investigate.

Using OACurl to explore Blogger’s API

Blogger’s GData API is now available over HTTPS using OAuth 2. These changes result in less code, increased productivity, and enhanced security. Let’s take a look at how it works using OACurl, a wrapper for the curlcommand line tool that authenticates you using OAuth.

Prerequisites

First up you need to install Mercurial and Maven. Mercurial is the source revision control software used by the OACurl project. Maven is a java build system used to download and include the dependencies required by OACurl. Once we begin using oacurl we will use HTML Tidy to make the returned XML readable.

Getting OACurl

Now that you have installed Maven and Mercurial, you can checkout oacurl and build it as follows.

$ hg clone https://oacurl.googlecode.com/hg/ oacurl
$ cd oacurl
$ mvn assembly:assembly

Once you have done this you will have a shell script in your current directory called oacurlthat you can use to invoke oacurl with all the appropriate Java class paths set for you.

Logging into Blogger

Logging into Blogger using OAuth involves doing a round trip to Google’s servers to grant access for third parties. In the case of oacurl, this involves invoking a web browser that shows you that oacurl is requesting access to your Blogger account.

$ ./oacurl login --blogger

Once you have granted access, then you will be able to explore Blogger’s API using oacurl.
Retrieving a list of your Blogger blogs

A good place to start is to list out your blogs. This is an Atom feed where each item in the list is a blog owned by the user who requested it.

$ ./oacurl https://www.blogger.com/feeds/default/blogs

To see the blogs of a specific user you can change the default for a specific user’s profile id instead. For instance, here is a list of my blogs.

$ ./oacurl https://www.blogger.com/feeds/16258312240222542576/blogs

To make the output XML readable, I suggest piping the output from the commands through tidy like this:

$ ./oacurl https://www.blogger.com/feeds/default/blogs | tidy -xml -quiet -indent

I will leave that off the following commands for readability.

Retrieving the feed of a specific Blogger blog

To retrieve the content of a blogger blog, we select the blog we want from the list of blogs in the blog feed, and then follow the appropriate link. In this case we are using the post link as it stays within the scope of our OAuth authorisation.

<link rel='http://schemas.google.com/g/2005#post'
    type='application/atom+xml' href= 'http://www.blogger.com/feeds/4967929378133675647/posts/default' />

Posting a new entry to a feed

If I wanted to post a new entry to my test blog, all I need to do is create a new entry in Atom format, and post it to the above url. So, I create a file with the following content called post.xml:

<entry xmlns='http://www.w3.org/2005/Atom'>
  <title type="text">Posting via OACurl</title>
  <content type="xhtml">And some <b>content</b>.</content>
</entry>

I can submit this to Blogger to create a new post like this:

$ cat post.xml | ./oacurl -X POST https://www.blogger.com/feeds/4967929378133675647/posts/default

This, of course, won’t work for you, as my test blog is only set up for me to post to. Modify the post URL in the command to match the one from one of the Blogger blogs you own. The result from the command is the fully expanded Atom entry for the post that was just created.

This Atom entry contains the information you need to modify it. The link with rel='edit'is the magic entry. For blogger, this is the same as the rel='self' link. To edit the content for the blog post I just created, first I retrieve the content at the edit URL:

$ ./oacurl https://www.blogger.com/feeds/4967929378133675647/posts/default/2170959137511831372 > post-edit.xml

We can now modify the title and content using a text editor, and then PUT it back, in proper REST style.

$ vi post-edit.xml
$ cat post-edit.xml | ./oacurl -X PUT https://www.blogger.com/feeds/4967929378133675647/posts/default/2170959137511831372

The Atom representation also contains the information required to create, retrieve, and delete the comments on this entry. See if you can spot the appropriate URLs in the output XML.

Using the libraries

You can use various libraries with the Blogger GData APIs, for example the Java GData client, but it is very useful to understand what the library is doing for you under the covers. And exploring is fun!

If you have any questions after reading this post, please feel free to post your questions to the Blogger Dev Google Group.

References

OACurl: http://code.google.com/p/oacurl/
OAuth: http://oauth.net/
Mercurial: http://mercurial.selenic.com/
Maven: http://maven.apache.org/
Atom overview: http://en.wikipedia.org/wiki/Atom_(standard)
Atom Specification: http://www.atomenabled.org/developers/syndication/atom-format-spec.php
HTML Tidy: http://www.w3.org/People/Raggett/tidy/
Java GData Client: http://code.google.com/p/gdata-java-client/
Blogger Dev Google group: http://groups.google.com/group/bloggerdev
Powered by Blogger.

Search This Blog

Blog Archive

    ?orderby=published&alt=json-in-script&callback=mythumb1\"><\/script>");
    ?orderby=published&alt=json-in-script&callback=mythumb\"><\/script>");