viv1
viv1

Reputation: 99

Google's Meeting API does not seem to work for server to server calls

I am trying to fetch details and artifacts from the google meet recording by using the recently released Google Meet APIs. I want to make a server to server API call, so have created a service account with access to Google Meet APIs.

I have also enabled Google Meet API in the console.

My approach:

from google.oauth2 import service_account
credentials = service_account.Credentials.from_service_account_file(
    filename='ultra-might-424911-b1-9f5cf95d5846.json',
    scopes=["https://www.googleapis.com/auth/meet.recordings.readonly"]  # Add the required scope
)
client = meet_v2.ConferenceRecordsServiceClient(credentials=credentials)
request = meet_v2.GetRecordingRequest(name="xxx-xxxx-xxx")
response = client.get_recording(request=request)
print(response)

Scope value is coming from https://developers.google.com/meet/api/guides/overview#auth (But these scopes are not present in https://developers.google.com/identity/protocols/oauth2/scopes )

This fails with:

google.api_core.exceptions.RetryError: Timeout of 60.0s exceeded, last exception: 503 Getting metadata from plugin failed with error: ('invalid_scope: https://www.googleapis.com/auth/meet.recordings.readonly is not a valid audience string.', {'error': 'invalid_scope', 'error_description': 'https://www.googleapis.com/auth/meet.recordings.readonly is not a valid audience string.'})

I have also tried this approach https://developers.google.com/identity/protocols/oauth2/service-account#jwt-auth But this fails with 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."

At this point, I have spent several hours and unsure how to get past this. Looking for any help or suggestion.

Upvotes: 0

Views: 274

Answers (1)

Linda Lawton - DaImTo
Linda Lawton - DaImTo

Reputation: 117254

if i am not mistaken you are using Method: conferenceRecords.get

If you check the docs it tells you what scope you need which is one of these

service account

You appear to be using a service account. You may want to also double check that you have configured the service account correctly in your google workspace domain Service account credentials

Upvotes: 1

Related Questions