A few tips for Web API design
vermorel.com
vermorel.com
Then make your website use that API and nothing else.
That way you are reasonably sure that the API scales, has enough features and is convenient to work with.
I can't find the HN post though.
I found it because I commented on it and had the same deja vu as you did :-)
My colleague just wrote up our process: http://news.ycombinator.com/item?id=2032346
If you use SSL, then it might be easiest to just use http authentication, transmitting the users credentials for each request, which is also the only official restful solution (each request should be independent of each other request).
If you don't want to do that, create an endpoint that takes username and password and returns a token which must then be present in each request (maybe even as part of the authorization header).
Or use OAuth.
The only place where it falls down some is when it comes to actually creating users. It's fine with one of the other flows because you can authenticate as an application with client credentials.
Guess which answer is getting me a lot more interest. :)
Except for consuming the API directly in a browser, there's little reason that XML should cause you pain.
I disagree. Unless the data I'm working with are awkward/difficult to represent in JSON (ie, they're highly structured documents, for which XML is ideal), XML is always more painful to work with. More painful to produce and to consume.
This is working primarily with Python and Javascript.
XML in iOS is a beast, and a real pain to read (and I've never attempted to write it).
Plus, on mobile devices especially, XML is slower to download because it is more verbose than the equivalent JSON object.
So I agree, unless you need a highly structured document, I always go with JSON over XML.
SOAP isn't going anywhere in the big-business world, but for smaller businesses/apps that can play faster and looser with data integration, I absolutely agree that REST is a simpler and more pleasant choice to work with.