Hi,

I'm developping a solution that migrates mailboxes between heterogenous 
systems.
Everything works great except the migration of personal contacts.

I'm in a multidomain environment but the Google contact api are not 
multidomain enabled.
I have an administrator account in the primary domain and I'm migrating 
users in sub domains.

I'm getting 401 Not authorized.

I've read that administrators cannot update personal contacts therefore I 
used OAuth key.

I followed exactly these articles:
OAuth: Managing the OAuth key and secret
http://support.google.com/a/bin/answer.py?hl=en&answer=162105 

OAuth: Managing API client access
http://support.google.com/a/bin/answer.py?hl=en&answer=162106 

And used this code:
http://code.google.com/googleapps/domain/articles/unshare-profiles-using-batch.html
 


Extract of code:
            String admin = administrator.Substring(0, 
administrator.IndexOf('@'));
            string admdom = 
administrator.Substring(administrator.IndexOf('@') + 1);
            
string consumerKey = "thedomain.com";
            string consumerSecret = "theconsumereKeyReplaced";
            RequestSettings settings = new 
RequestSettings(_ApplicationName, consumerKey, consumerSecret, admin, 
admdom);
            settings.AutoPaging = true;
            _CR = new ContactsRequest(settings);


-- 
You received this message because you are subscribed to the Google
Groups "Google Contacts, Shared Contacts and User Profiles 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://code.google.com/apis/contacts/community/forum.html

Reply via email to