Small sample in Java:
ContactsService service = new ContactsService("app-name");
// Oauth
OAuthSigner signer = new OAuthHmacSha1Signer();
GoogleOAuthParameters oauthParameters = new GoogleOAuthParameters();
oauthParameters.setOAuthConsumerKey("domain.com");
oauthParameters.setOAuthConsumerSecret("XXXX....");
oauthParameters.setScope("http://www.google.com/m8/feeds/");
// Create ContactService and authenticate using oauth credentials
service.setOAuthCredentials(oauthParameters, signer);
GoogleOAuthHelper oauthHelper = new GoogleOAuthHelper(signer);