0
Python을 통해 Youtube Analytics API를 사용하려고합니다. Google 개발자 웹 사이트에서 샘플 Python 코드를 다운로드했습니다. 나는 그것을 실행할 때마다Youtube Analytics API 용 OAuth2 구성이 어려움 :
https://developers.google.com/youtube/analytics/v1/code_samples/python
, 내 브라우저가 다음과 같은 오류 메시지가있는 페이지를 엽니 다 : 여기 링크입니다
**Error: redirect_uri_mismatch The redirect URI in the request: [http://localhost:8080/] did not match a registered redirect URI**
구글 클라우드 콘솔 내 응용 프로그램이 함께 설치되어
URI와 자바 스크립트 기원 리디렉션 다음, 내가 라인 24에서 프로그램에 전달할 내 client_secrets.json 파일의
**Redirect URIs
[http://localhost:8080/oauth2callback]
Javascript Origins
[http://localhost:8080]**
내용을 F로 본다 ollows :
{"web":{"auth_uri":"[https://accounts.google.com/o/oauth2]/auth","client_secret":"KNLERUsUrOsOiJTzyaSWN2JG","token_uri":"[https://accounts.google.com/o/oauth2/token]","client_email":"[email protected]account.com","redirect_uris":["[http://localhost:8080/oauth2callback]"],"client_x509_cert_url":"[https://www.googleapis.com/robot/v1/metadata/x509/[email protected]account.com]","client_id":"409435120404-k62menuelac66nbl9ic82uqakbd4nhrh.apps.googleusercontent.com","auth_provider_x509_cert_url":"[https://www.googleapis.com/oauth2/v1/certs]","javascript_origins":["[http://localhost:8080]"]}}
저는 우분투 13.10을 실행하고 있습니다. 이 문제를 해결하는 데 큰 도움이 될 것입니다. 그 이유는 무엇입니까?
DalmTo, 답장을 보내 주셔서 감사합니다. 그러나 나는 redirect_uris를 이미 승인을 위해 제공 한 것과 동일하게 설정했습니다. 내 json 파일의 주소가 일치하는지 확인할 수 있습니다. 실제로 JSON 파일은 내가 설정 한 redirect_uris를 기반으로 Google 클라우드 콘솔에 의해 생성되었습니다. – user3366986