저는 YouTube API를 처음 사용하는 사용자이며 문서를 읽었습니다. 그러나 비 기본 기능에 관해서는 의사가 매우 명확하지 않으며 자체 쿼리에 응답하기 위해 확인해야 할 다른 문서가없는 것 같습니다.토큰이 서버 측 응용 프로그램에서 오프라인으로 사용되기 전에 취소되었는지 (사용자 별) 확인하려면 어떻게합니까?
설명해 드리죠 :
나는 기본 인증/토큰 예는 https://developers.google.com/youtube/reporting/guides/authorization/server-side-web-apps#example를 제공하고 잘 작동 구현했습니다.
이제, 액세스 토큰을 가정하면 ("오프라인"데이터 검색에서 나중에 사용하기 위해) 오히려 세션보다 데이터베이스에 저장됩니다 ... 내 질문은 :
나는 사용자가 취소 여부를 확인하려면 어떻게 내 응용 프로그램에 대한 액세스 권한은 아마 계정 설정을 통해 결정됩니까? 이 방법으로 권한이 취소되고 (현재 유효하지 않은) 액세스 토큰을 오프라인으로 사용하려고하면 어떻게됩니까?
UPDATE
불행하게도이 An error occurred: { error: invalid_grant, error_description: Token has been expired or revoked. }
반환되는 원시 오류를 반환하지 않는 것은 잡았지만, 매우 이상한 될 수
Uncaught exception 'Google_Service_Exception' with message '{ "error": { "code": 401, "message": "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.", "errors": [ { "message": "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.", "domain": "global", "reason": "unauthorized" } ], "status": "UNAUTHENTICATED" } }
입니다. 오류가 표시된대로 잘못된 자격 증명이 없습니다 ... 승인이 없습니다!
설명서가 심각하게 부족합니다.
해결책을 찾았습니까? – usama