I was researching to use Google API for certain activities.
There are 2 kinds of access
There are 2 kinds of access
- oauth
- clientlogin (username and password)
Client Login:
More documentation here http://code.google.com/apis/contacts/docs/2.0/developers_guide_java.html
Using cUrl is here http://code.google.com/apis/gdata/articles/using_cURL.html
Thing to Note:
- Service Type: More here http://code.google.com/apis/gdata/faq.html#clientlogin for contacts, service type is "cp"
- There are 2 request to fetch the actua value
- First Request URL: curl https://www.google.com/accounts/ClientLogin --data-urlencode Email=YOURID@gmail.com --data-urlencode Passwd=PASSWORD -d accountType=GOOGLE -d source=Google-cURL-Example -d service=cp
- Response for the above Request will be: SID=DQ...........A
LSID=EUBBBIaBADCl...........2JKOuGh
- Make second Request by using Auth param from the above response:
- curl --silent --header "Authorization: GoogleLogin auth=AUTH_TOKEN_FROM_ABOVE_RESPONSE" "https://www.google.com/m8/feeds/contacts/YOURID@gmail.com/full"
- Second response will be the address details, thats it.
No comments:
Post a Comment
Thanks for reading and welcome for commenting...