Logging into SO with curl

Posted by Good Person on Stack Overflow See other posts from Stack Overflow or by Good Person
Published on 2010-05-21T11:26:12Z Indexed on 2010/05/24 9:31 UTC
Read the original article Hit count: 200

Filed under:
|
|
|
|

I'm working on a project and I want to log into SO via curl.

I use an openid via Google which means that I need to log into Google first.

Here is the code I have so far

#!/usr/bin/env sh
  . ./params.sh #the file with username and password
curl --silent https://www.google.com/accounts/ClientLogin \
-d Email=$username -d Passwd=$password \
-d accountType=GOOGLE \
-d source=localhost-test-1 \
-d service=lh2 \
-o tokens
#get $Auth as a variable
. ./tokens
echo $Auth;

How do I use the $Auth token to log into SO?

edit: I found http://code.google.com/apis/gdata/articles/using_cURL.html and I'll post the updated code soon.

© Stack Overflow or respective owner

Related posts about bash

Related posts about shell