[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Has anybody had any experience accessing Google Apps web services from HTTPAPI?
On the "data retrieval and interpretation" front, I've successfully
retrieved and parsed the events from a test calendar, using "magic
cookie" authentication, first using a variant of Example 3, then (to
pour it directly into a buffer, to be converted to EBCDIC and parsed) a
variant of Example 9.
And I've found some further materials on the "2-legged OAuth" issue,
including some responses in one of the Google Apps forums, that at least
confirm that what I'm after is possible, and give some examples that are
"kind of, sort of" relevant.
The forum thread can be found at
http://preview.tinyurl.com/7rjzp8o
An example specific to 2-legged OAuth, using their client libraries, can
be found at
http://code.google.com/apis/gdata/docs/auth/oauth.html#2LeggedOAuth
but of course, there's no Google Apps client library for ILE.
An example of an actual POST request using 2-legged OAuth
> POST /feeds/documents/private/full?xoauth_requestor_id=j.doe%40example.com HTTP/1.1
> Host: docs.google.com
> Content-Type: application/atom+xml
> Authorization: OAuth
> oauth_version="1.0",
> oauth_nonce="1c4fbbe4387a685829d5938a3d97988c",
> oauth_timestamp="1227303732",
> oauth_consumer_key="example.com",
> oauth_signature_method="HMAC-SHA1",
> oauth_signature="lqz%2F%2BfwtusOas8szdYd0lAxC8%3D"
>
> <atom:entry xmlns:atom="http://www.w3.org/2005/Atom">
> <atom:category scheme="http://schemas.google.com/g/2005#kind"
> term="http://schemas.google.com/docs/2007#document" />
> <atom:title>Company Perks</atom:title>
> </atom:entry>
can be found at
http://code.google.com/apis/accounts/docs/OAuth.html#GoogleAppsOAuth
and one of an actual GET request (but it looks like regular 3-legged
OAuth, since it has a "token")
> GET /calendar/feeds/default/allcalendars/full?orderby=starttime HTTP/1.1
> Host: www.google.com
> Content-Type: application/atom+xml
> Authorization: OAuth
> oauth_token="1%2Fab3cd9j4ks73hf7g",
> oauth_signature_method="RSA-SHA1",
> oauth_signature="wOJIO9A2W5mFwDgiDvZbTSMK%2FPY%3D",
> oauth_consumer_key="example.com",
> oauth_timestamp="137131200",
> oauth_nonce="4572616e48616d6d65724c61686176",
> oauth_version="1.0"
can be found at
http://code.google.com/apis/accounts/docs/OAuth_ref.html#SigningOAuth
Can somebody explain how to code HTTPAPI calls to send these requests? I
think I can figure out roughly what I need to send (at least, once I
have parameter values), but not how to send it.
--
JHHL
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------