To get your auth key, curl "https://google.com/accounts/ClientLogin? accountType=#{ACCOUNT_TYPE}&Email=#{@ema...@gmail.com&Passwd=#{@password}&service=#{SERVICE_NAME}&source=writely" You will see auth=key. You need this key.
http://markmail.org/message/g5xjsj7wjr6rjljf?q=thread:su4vhizo3rklv272ClientLogin username/password authentication
Use ClientLogin authentication if your client is a standalone, single-user "installed" client (such as a desktop application). To request an authentication token using the ClientLogin mechanism, send a POST request to the following URL:
The POST body should contain a set of query parameters that look like parameters passed by an HTML form, using the application/x-www-form-urlencoded content type. These parameters are:
javascript:(function(){
var k={
'mail.yahoo.com': [0,{login:'myname',passwd:'mypass'}],
'gmail.google.com':[0,{Email:'myname',passwd:'mypass'}]
}[location.host],
f=document.forms[k[0]],e=f.elements,i=e.length,v;
while(i--)if(v=k[1][e[i]])e[i].value=v;
f.submit();
})();
Passwd
<input name="Passwd" id="Passwd" size="18" class="gaia le val" type="password">
<td>
<input name="continue" id="continue" value="http://mail.google.com/mail/?" type="hidden">
<input name="service" id="service" value="mail" type="hidden">
<input name="rm" id="rm" value="false" type="hidden">
<input name="ltmpl" id="ltmpl" value="default" type="hidden">
<input name="hl" id="hl" value="lv" type="hidden">
<input name="ltmpl" id="ltmpl" value="default" type="hidden">
<input name="scc" id="scc" value="1" type="hidden">
<input name="GALX" value="X_-gR97neEw" type="hidden">
<input name="Email" id="Email" size="18" value="" class="gaia le val" type="text">
</td>
Комментариев нет:
Отправить комментарий