Google Meet Media API

Google Meet Media API allows receiving audio and video from a meeting without a bot!

📘

Limitations

  • Currently, because this feature is still in preview mode, all meeting participants need to be enrolled in Google's developer program
  • Google's Meet Media API only sends audio and video of the 3 most relevant participants at any given time
  • You can only receive media data (no sending messages or Output Media)
  • Meet Media does not support Breakout rooms
  • Meet Media API doesn’t send out transcriptions of the meeting, so instead of requesting meeting_captions you’ll need to use one of our Transcription Providers

Google Cloud Setup

  1. Access or create a Google Cloud Account
  2. Join Google Cloud Developer Program
    1. Current all participants need to be in Google's Developer Program in order to use Meeting Direct Connect
  3. Create a Google Client ID
    1. Select "Web Application"
    2. Add an Authorized JavaScript origin with your domain
      1. We recommend testing with an Ngrok static domainto get started
    3. Save this Client ID
  4. Enable the Google Meet API

Quickstart

Before you connect to a Google Meet, you'll need a way to generate an OAuth token from your Google Cloud ClientID.

const client = google.accounts.oauth2.initTokenClient({
  client_id: clientId,
  scope: 'https://www.googleapis.com/auth/meetings.space.created https://www.googleapis.com/auth/meetings.conference.media.readonly https://www.googleapis.com/auth/meetings.space.readonly',
  callback: (tokenResponse) => {
    console.log(tokenResponse.access_token);
    window.accessToken = tokenResponse.access_token;
  },
  error_callback: (errorResponse) => {
    console.log('error');
    console.log(errorResponse);
  },
});
window.client = client;
client.requestAccessToken();

Once you've generated your temporary OAuth access_token start the meeting and get the space_name. This is the 12 character path after meet.google.com/

const response = await fetch(`https://us-east-1.recall.ai/api/v1/meeting_direct_connect`, {
  method: 'POST',
  headers: {
    'Authorization': `Token ${RECALL_API_KEY}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    google_meet_media_api: {
      space_name: $SPACE_NAME,
      access_token: window.accessToken
    },
    // Other options (e.g. recordings, real time events, webhooks, transcriptions)
    // are consistent with https://docs.recall.ai/reference/bot_create
    // NOTE meeting_captions (https://docs.recall.ai/docs/meeting-caption-transcription) won’t work with Meet Media, as only audio and video streams are output
    // If you want transcriptions with Google Meet Media API, please use a transcription provider: https://docs.recall.ai/docs/ai-transcription
    recording_config: {
      video_mixed_mp4: {}
    }
  })
});

Get the Recording

To get any artifacts from the meeting, you’ll use the id received when creating the meeting_direct_connect to query the Retrieve Meeting Direct Connect endpoint to receive its current state and any artifacts of recordings or transcriptions

const meetingObj = await fetch(`https://us-east-1.recall.ai/api/v1/meeting_direct_connect/${my_mdc_id}`, {
  headers: {
    'Authorization': `Token ${RECALL_API_KEY}`
  } 		
}).then(r => r.json());

This object will contain a recordings section with pre-signed links to view your Meeting Direct Connect recordings

if (meetingObj.recordings.length == 0) {
  console.log("No recordings were made, maybe you didn’t request one?");
} else {
  var videoLink = meetingObj.recordings[0].media_shortcuts.data.download_url;
  console.log(`Your recording is ready to view at ${videoLink}`);
}

Next Steps

  • If you want a botless form factor, but without the limitations of Meeting Direct Connect, you should check out the Desktop SDK
  • If you want to be able to input chat, audio, or video data into a meeting, check out Bots

What’s Next