from google.oauth2.service_account import Credentials
from googleapiclient.discovery import build
import random
import msvcrt 
import json

credentials_doc = 'service_account.json'


service_account_info = json.load(open(credentials_doc))
credentials = Credentials.from_service_account_info(service_account_info)
service = build('drive', 'v3', credentials=credentials)

document_id='my_doc_drive_id'

document = service.documents().get(documentId=document_id).execute()
print(document)

error:
<module>
document = service.documents().get(documentId=document_id).execute()
^^^^^^^^^^^^^^^^^
AttributeError: ‘Resource’ object has no attribute ‘documents’. Did you mean: ‘comments’?

how can i get my document
**
drivelink:https://docs.google.com/document/d/my_doc_drive_id**

I want to get my drive doc infos and processing incomings

New contributor

isil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.