이 endpoint : 나에게 오류를 제공Google 클라우드 스토리지 제공 '권한 부족'
get_media(bucket=*, object=*, ifGenerationNotMatch=None, generation=None, ifMetagenerationMatch=None, ifGenerationMatch=None, ifMetagenerationNotMatch=None, projection=None)
:
apiclient.errors.HttpError: <HttpError 403 when requesting https://www.googleapis.com/storage/v1/b/my-logs/o/clickstream.1413365729497.log?alt=json returned "Insufficient Permission">
코드 :
service = build('storage', 'v1')
contents = service.objects().get(bucket=item['bucket'], object=item['name']).execute(http=http)
item
이전 (성공한) buckets.list
전화에서 온 것입니다. 그래서 서비스 계정에 대한 권한 오류가 너무 이상합니다.
이 내 로컬 호스트에서 현재, 그리고 내 인증은 다음과 같습니다
with open(FILE_KEY, 'rb') as f:
key = f.read()
credentials = SignedJwtAssertionCredentials(
SERVICE_EMAIL_ADDRESS,
key,
scope='https://www.googleapis.com/auth/devstorage.full_control',
)
http = httplib2.Http()
http = credentials.authorize(http)
객체 (내가 나중에 업로드 새로운 테스트 객체), 기본 ACL 권한으로 작성됩니다. 서비스 계정이 파일 내용을 검색하는 데 어떻게 작동하지 않습니까? 여기 방해 할 수있다
죄송합니다. 혼란 스럽습니다. service.objects.get()에 대한 호출이 보이지만 service.objects(). get_media()에 대한 호출도 있습니다. 어느 쪽이 실패하고 있습니까? –