Google Meet API Error : Python Got an unexpected keyword argument

Google Meet API Error : Python Got an unexpected keyword argument

我正在尝试获取有关 Google Meet 会议的信息。当我没有传递 Google Meet Id 时,我可以获得与应用程序 Google Meet 相关的所有信息。但是当我通过 meeting_code 时,出现以下错误。 https://developers.google.com/admin-sdk/reports/v1/appendix/activity/meet

def main():

    creds = service_account.Credentials.from_service_account_file('srv.json', scopes=SCOPES, subject='admin@*****.com')
    service = build('admin', 'reports_v1', credentials=creds)

    # filters = [{'meeting_code': 'cyo-cdzc-tqp'}]
    results = service.activities().list(userKey='all', applicationName='meet', maxResults=5, meeting_code='cyo-cdzc-tqp').execute()
    print(results)

if __name__ == '__main__':
    main()
TypeError: Got an unexpected keyword argument "meeting_code"

应该传递的参数是(到列表方法)

userKey, applicationName, maxResults, filters

现在需要使用会议代码进行过滤,所以通过

filters='meeting_code==cyocdzctqp'

You should pass meeting code without hyphen

from googleapiclient.discovery import build
from google.oauth2 import service_account

import pprint
pp = pprint.PrettyPrinter(indent=4)

SCOPES = ['https://www.googleapis.com/auth/admin.reports.audit.readonly']

def main():

    creds = service_account.Credentials.from_service_account_file('srv.json', scopes=SCOPES, subject='admin@***.**')
    service = build('admin', 'reports_v1', credentials=creds)

    results = service.activities().list(userKey='all', applicationName='meet', maxResults=5, prettyPrint=True, filters='meeting_code==cyocdzctqp' ).execute()
    pp.pprint(results)

if __name__ == '__main__':
    main()