Hi David,

We're in the process of documenting that new feature better.  Below is
a snippet which uses the Python OAuth library from:

http://code.google.com/p/oauth


import httplib
import oauth.oauth as oauth

CONSUMER_KEY='domain.com'
CONSUMER_SECRET='XXXXXYYYYYZZZZZ'
USER='[EMAIL PROTECTED]'
CONTACTS_URL='http://www.google.com/m8/feeds/contacts/default/full'

consumer = oauth.OAuthConsumer(CONSUMER_KEY, CONSUMER_SECRET)
request = oauth.OAuthRequest.from_consumer_and_token
(consumer,http_url=CONTACTS_URL, parameters={'xoauth_requestor_id':
USER})
request.sign_request(oauth.OAuthSignatureMethod_HMAC_SHA1(), consumer,
None)

connection = httplib.HTTPConnection('www.google.com')
connection.request('GET', '%s?%s' % (CONTACTS_URL, request.to_postdata
()))
print connection.getresponse().read()


-alex

On Nov 10, 5:48 pm, David Ruwoldt <[EMAIL PROTECTED]> wrote:
> Dear Anirudh,
>
> Do you have any python code that shows how to use OAuth with the
> consumer secret?
>
> Yours sincerely
>
> David Ruwoldt
>
> On Nov 10, 8:49 pm, dlw0193 <[EMAIL PROTECTED]> wrote:
>
> > Thanks so much. That worked like a charm. Looks like I'm ready to try
> > learning a new language!
>
> > Thanks again,
>
> > Darrell
>
> > On Nov 10, 4:57 am, "Anirudh (Google)" <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
>
> > > The methods required for Authentication are provided in the library.
> > > Here is the code that you would need to write to authenticate yourself
> > > and say update the signature:
>
> > > import gdata.apps.emailsettings.service
>
> > > service = gdata.apps.emailsettings.service.EmailSettingsService
> > > (email="[EMAIL PROTECTED]", password="pass", domain="domain.com")
> > > service.ProgrammaticLogin()
> > > service.UpdateSignature( username="user", signature="howdy")
>
> > > We do have a Java/Swing based GUI client available for Email Settings
> > > API. It is bundled with Java GData 
> > > library:http://code.google.com/p/gdata-java-client/downloads/list
>
> > > We also acknowledge the need for better language specific guides for
> > > various APIs provided and will take your query as valuable feedback
> > > regarding the same.
>
> > > -Anirudh
>
> > > On Nov 9, 8:28 am, dlw0193 <[EMAIL PROTECTED]> wrote:
>
> > > > Hi all,
>
> > > > I am trying to get started using the gmail settings API. I have
> > > > downloaded Python 2.6 and the GData library.
>
> > > > I have almost no programming experience. I'm able to run some of the
> > > > samples included in the GData library and access my personal GDocs.
> > > > However, I can't seem to find the correct code to get an
> > > > authentication token to use in accessing gmail settings for my Apps
> > > > account.
>
> > > > Can anyone point me in the right direction or provide the Python  code
> > > > I need to use?
>
> > > > On a related note, are there any slick GUIs available that simplify
> > > > using the APIs?
>
> > > > Thanks in advance.
>
> > > > D
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Apps APIs" 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-apps-apis?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to