次のコードを使用して、Python でアプリケーションのアクセス トークンを取得します。
CLIENT_SECRETS = 'client_secrets.json'
MISSING_CLIENT_SECRETS_MESSAGE = "Missing Client Secrets"
FLOW = flow_from_clientsecrets(os.path.join(os.path.dirname(__file__), CLIENT_SECRETS),
scope=['https://www.googleapis.com/auth/drive','https://www.google.com/m8/feeds'],
message=MISSING_CLIENT_SECRETS_MESSAGE)
storage = Storage('drive.dat')
credentials = storage.get()
credentials = run(FLOW, storage)
http = httplib2.Http()
http = credentials.authorize(http)
service = build("drive", "v2", http=http)
しかし、アクセス トークンを取得した後、Python の gdata クライアント ライブラリを使用して gmail 連絡先リストを取得するにはどうすればよいですか? クライアント ライブラリのサンプルでは、OAuth 認証を使用していませんが、別の方法を使用しています。