2016-03-21 19 views
0

現在のユーザーのプロフィール情報を取得するには、Google+ APIとのサーバー側の通信を使用します。私は、Python用のGoogle例に係る利用者のログイン:Google+ APIを使用するとHttpAccessTokenRefreshErrorが発生する

credentials = client.credentials_from_clientsecrets_and_code(
    CLIENT_SECRET_FILE, 
    ['https://www.googleapis.com/auth/drive.appdata', 'profile', 'email'], 
    code) 

は、それから私は、Google +のAPIを呼び出す:

http_auth = credentials.authorize(httplib2.Http()) 
service = build('plus', 'v1', http = http_auth) 
google_request = service.people().list(userId = 'me', collection = 'visible') 
result = google_request.execute() 

これは、次のエラーthows:

HttpAccessTokenRefreshError: invalid_grant 

を誰もが持っています私はこれについて何ができるのか?

答えて

0

私はトピックが愚かなようですので、私は質問を削除したかったが、私はGithubの上のコードサンプルから間違ったAPI呼び出しを、貼り付けコピー最初に代わりpeople().list()

の正しい方法people().get()を使用して問題を解決し、したがって、他の人たちもこの問題に遭遇すると私は想像することができます。

関連する問題