google-api-python-client

Google API Service Account. Can only see service accounts drive even with Domain Wide Delegation Access

孤街浪徒 提交于 2020-07-10 03:15:39
问题 I'm currently using a Google Service Account that has domain wide delegation enabled ( I followed this link https://developers.google.com/identity/protocols/oauth2/service-account, and this link https://developers.google.com/admin-sdk/reports/v1/guides/delegation), and has "https://www.googleapis.com/auth/drive scope enabled. I have downloaded the json credentials for the service account and placed them in the same directory as my python script. The problem is when I impersonate another user

Google Drive API: The user has not granted the app error

和自甴很熟 提交于 2020-06-27 08:13:31
问题 I'm following the Quickstart on https://developers.google.com/drive/api/v3/quickstart/python. I've enabled the drive API through the page, loaded the credentials.json and can successfully list files in my google drive. However when I wanted to download a file, I got the message `The user has not granted the app ####### read access to the file` Do I need to do more than putting that scope in my code or do I need to activate something else? SCOPES = 'https://www.googleapis.com/auth/drive.file'

Why YouTube API Scopes error happens on the Windows Server?

有些话、适合烂在心里 提交于 2020-06-23 16:00:10
问题 I am using YouTube API to get the data and for a month there is an error when I try to make a request on a Windows Server 2012 R2, (local works). Basically, before the script makes a request he updates a YouTube token in order not to perform a log on into Google Account. The function loads a pickle file with the credentials and updates them if necessary. The error happens on the line "creds.refresh(Request())" by drilling down by scopes- def main_load_page(youtube, API_VERSION, SCOPES, CLIENT