1

Google 연락처 API https://developers.google.com/google-apps/contacts/v3/을 통해 Google 연락처로 사용자에게 액세스하는 앱을 보유하고 있습니다. gdata 라이브러리에 액세스하려면 gdata 라이브러리를 사용하고 로그인하려면 OpenID + OAuth1을 사용하고 승인을 요청하려면 을 사용하고 있습니다. 구글은 최근 일부 변경을 현재 상태 :Google 연락처 API + API 키 + OAuth = 401 클라이언트 오류

Warning: Due to enhanced security measures we've added to our 
infrastructure, all developers using the Contacts API must register their 
projects in the API Console <https://code.google.com/apis/console> and 
ensure the Contacts API is activated in the API Console. 


If your application has certain unusual authorization requirements, such aslogging 
in at the same time as requesting data access (hybrid<http://code.google.com/apis/accounts/docs/OpenID.html#oauth> 
) or domain-wide delegation of authority (2LO<http://code.google.com/apis/accounts/docs/OAuth.html#GoogleAppsOAuth> 
), then you cannot currently use OAuth 2.0 tokens. 
In such cases, you must instead use OAuth 1.0 tokens and an API key<http://code.google.com/apis/console-help/#WhatIsKey> 
. You can find your application's API key in the GoogleAPI Console<https://code.google.com/apis/console#access>, 
in the Simple API Access section of the API Access pane. 

어떻게 당신이 측면을 따라 API 키를 GDATA 요청을 설정합니까? (oAuth 토큰을 모두 처리한다고 가정 할 때)?

query = gdata.contacts.service.ContactsQuery(params={'key':'MY_API_KEY'}) 
query.max_results = 200 
feed = googleintegration.contacts_service.GetContactsFeed(query.ToUri()) 

그러나 나는 항상 401 클라이언트 오류를 ​​다시 얻을 :

은 내가 시도했습니다.

답변

0

OAuth 1에서 벗어나 OAuth 2.0으로 전환하는 것이 좋습니다. OAuth 1은 좋은 이유로 인해 사용되지 않습니다.