[dzach] 2008-6-25: How can one post a message to a google Blogger blog programmatically using TCL? Given the popularity of Google's Blogger platform, it might be a good idea to provide some basic functionality here. Google's '''Account Authentication API''' documentation can be found at: http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html#ClientLogin and a guide for the API here: http://code.google.com/apis/blogger/developers_guide_protocol.html#CreatingPublicEntries My efforts so far stumbled on the ClientLogin process. Here is the code I've tried: namespace eval ::google { proc ::google::init {} { # packages http and tls are needed if {[catch {package require tls} err]} { package req http return $err } variable account variable def array set var { url https://www.google.com/accounts/ClientLogin timer_http 30000 } array set def { accountType GOOGLE Email Passwd service blogger source } foreach {key val} [array get def] { append query "$key=${val}&" } ::http::register https 443 ::tls::socket set query [::http::formatQuery [string range $query 0 end-1]] # by specifying the -query option http::geturl sends a POST instead of a GET request, with a Content-type: application/x-www-form-urlencoded header # sent the POST request set token [::http::geturl $var(url) -timeout $var(timer_http) -query $query] # see what the reply was parray $token if {[::http::status $token] ne "ok"} { # somethng went wrong return "Could not get a reply from $var(url) . [::http::status $token]" } set data [::http::data $token] ::http::cleanup $token return $data } }; # end namespace ::google The above should return something like: HTTP/1.0 200 OK Server: GFE/1.3 Content-Type: text/plain SID=DQAAAGgA...7Zg8CTN LSID=DQAAAGsA...lk8BBbG Auth=DQAAAGgA...dk3fA5N where '''Auth=DQAAAGgA...dk3fA5N''' is the authorization key to use in all subsequent requests. However, I'm getting the following: Error=BadAuthentication Any suggestions on how to proceed? ---- !!!!!! %|[Category Internet]|% !!!!!!