Hello. I'm writing a GAE application (using Python) that uses Gdata
API to access my Google App Contacts under my own domain.

I have Google Apps all working fine, the GAE App is configured to
authenticate at my domain, and it's hosted at a URL (via appspot)
under my domain etc.

However, I continue to have problems accessing these contacts. In a
version of the app outside my domain it can access GMail
(www.gmail.com) contacts no problem.

I've searched multiple times all the documentation and forum posts I
could find, and tried all the combinations I can think of.

GenerateAuthSub
=============
I authenticate with the scope shown:

CONTACTS_SCOPE = 'http://www.google.com/m8/feeds/contacts/'
HOME_DOMAIN = 'autelic.org'

scopes = CONTACTS_SCOPE + ('%s/' % users.get_current_user().email())

url = client.GenerateAuthSubURL(next_url, scopes, secure=False,
session=True, domain=HOME_DOMAIN)

Interestingly, that AuthSub request generates a google page requesting
the permission where the scope is shown to be

"www.google.com/m7/a/autelic.org"

i.e. different from the one I requested, I assume specifying 'domain'
caused that and it's correct???

then I get a session token and store it...
        session_token = client.upgrade_to_session_token(auth_token)

         # Store a long-lived token for this user
         if session_token:
            client.token_store.add_token(session_token)

then I try and access my contacts:

    client = gdata.contacts.service.ContactsService()
    gdata.alt.appengine.run_on_appengine(client)

    try:
       contacts = client.GetContactsFeed(feed_url).entry

but I get an exception thrown by GetContactsFeed(feed_url)

I've tried it with the following URLs for feed_url

feed_url = 'http://www.google.com/m8/feeds/contacts/user%40domain.com/
full'    this works for GMail (outside current domain)
feed_url = 'http://www.google.com/m8/feeds/contacts/default/full'
feed_url = 'http://www.google.com/m8/feeds/default/full'
feed_url = 'http://www.google.com/m8/feeds/user%40domain.com'
feed_url = 'http://www.google.com/m8/feeds/contacts/user
%40domain.com/'

with no success.

Having seen the authorization page shown by Google with "m7" I also
tried  "m7" variants of the one that normally works for GMail, thus

feed_url = 'http://www.google.com/m7/a/autelic.org/feeds/contacts/
full'
feed_url = 'http://www.google.com/m7/a/autelic.org/feeds/contacts/
$user/full'
feed_url = 'http://www.google.com/m7/a/autelic.org/feeds/contacts/
[email protected]/full'

with no success.

QUESTIONS
==========
Should I make any changes to the GenerateAuthSubRequest() call
specifically for Google App domains?

What feed_url should I use to get access to the signed-in user's
contacts on Google Apps on this domain?

Thanks in advance!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Contacts 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-contacts-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to