On Sun, 2009-06-28 at 03:06 -0700, Celebird wrote:
> which demo exactly?

http://www.google.com/base/api/demo/html/demo.html


> which two specific "headers" are incompatible?

Online and offline HTTP request headers


> how does this incompatibility manifest itself?

Umm... the online one wont authenticate for offline headers.



Anyway, I managed to figure out the issue given some trial and error
combined with documentation


Here are the two different kinds of authentication headers:

<----- online authentication request header ----->
POST /accounts/OAuthGetAccessToken HTTP/1.1
Host:  https://www.google.com
Content-Type: application/x-www-form-urlencoded
Authorization: OAuth


<----- offline authentication request header ----->
POST /accounts/ClientLogin HTTP/1.1
content-type: application/x-www-form-urlencoded
Host: www.google.com
Authorization: GoogleLogin


-----------------------------------------------------------------------

For anyone who is trying to authenticate their offline application, this
is the (HTTPS) request you need to make:


<----- HEADER ----->
POST /accounts/ClientLogin HTTP/1.1
content-type: application/x-www-form-urlencoded
Host: www.google.com
Authorization: GoogleLogin
<----- END HEADER ----->

<----- FORM/POST VARIABLES----->
accountType = HOSTED_OR_GOOGLE
Email = myemail%40address.com
Passwd = mypassword
service = gbase
source = client-program-id
<----- END FORM/POST VARIABLES ----->

<----- FORM/POST VARIABLES COMBINED ----->
?accountType=HOSTED_OR_GOOGLE&Email=myemail%
40address.com&Passwd=mypassword&service=gbase&source=client-program-id
<----- END FORM/POST VARIABLES COMBINED ----->


The response you get from this will contain this data (the header is
unimportant):

SID=DQAAAIMAAADp...upfJ0penIR2ytbjgaJB
LSID=DQAAAIUAAAB...2rs5drUv6Cm24cOcUKX
Auth=DQAAAIUAAAB...Abve8DC6uOKAG3L9Iz0

Auth is the only important value.


Future queries requiring authentication should be made in a fashion like
this:

<----- HEADER ----->
GET /base/feeds/items HTTP/1.1
content-type: application/atom+xml
Host: www.google.com
Authorization: GoogleLogin auth=DQAAAIUAAAB...Abve8DC6uOKAG3L9Iz0
<----- END HEADER ----->


<----- FORM/POST VARIABLES COMBINED ----->
?bq=digital+camera
<----- END FORM/POST VARIABLES COMBINED ----->


That's it.  I hope this helps someone in the future.




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Base Data API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Base-data-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to