2014-12-22 4 views
1

이 오류는 계속 발생합니다. 401입니다. 오류입니다.Google 드라이브 API에 대한 지원이 필요합니다.

오류 : invalid_client

OAuth 클라이언트를 찾을 수 없습니다. 요청 세부 사항

immediate=false 
response_type=token 
scope=https://www.googleapis.com/auth/drive.readonly 
redirect_uri=postmessage 
proxy=oauth2relay911247760 
state=882158738|0.380667456 
origin=http://www.myserver.dev 
include_granted_scopes=true 
client_id=733677449783-holhtgvu994e0oavk4hud3mupbu71b2f.apps.googleusercontent.com.apps.googleusercontent.com 
authuser=0 

그게 전부입니다.

나는 가능으로 Proj1 은 참고 Proj1 에 제품 이름을 설정 프로젝트 관련 API를 클라이언트 ID 733677449783-holhtgvu994e0oavk4hud3mupbu71b2f.apps.googleusercontent.com 자바 스크립트 기원 http://www.myserver.dev 리디렉션 URI를 https://www.example.com/oauth2callback API 키 AIzaSyDBt5을 만들었습니다 -gE9xJOGIqamru46cw-RIipKbsI2o

설정해야 할 다른 매개 변수가 있습니까?

답변

-1
string state = "882158738|0.380667456"; 
string scope = "https://www.googleapis.com/auth/drive.readonly"; 
string redirect_uri = "APIAddress"; 
string GoogleClientID= "your ClientID"; 

string oauthUrl = string.Format("https://accounts.google.com/o/oauth2/auth?" + 
            "scope={0}&state={1}&redirect_uri={2}&response_type=code&client_id={3}&approval_prompt=force&access_type=offline", 
HttpUtility.HtmlEncode("scope"), 
state, 
HttpUtility.HtmlEncode(redirect_uri), 
HttpUtility.HtmlEncode(GoogleClientID)); 

return oauthUrl ; 
관련 문제