This page explains how to set up and run a sample using the TypeScript reference client implementation. To learn about the C++ client instead, see the C++ reference client quickstart.
Prerequisites
To run this quickstart, you need the following prerequisites:
- You've cloned the GitHub repository.
- Webpack.
- Node.js.
- Yarn.
gcloud
CLI.- A Google Cloud project with Google Meet REST API enabled.
- A Google Workspace account.
- Use a Chrome browser with version >= 94.
Enable the Meet REST API
Before using Google APIs, you need to turn them on in a Google Cloud project. You can turn on one or more APIs in a single Google Cloud project.Google Cloud console
In the Google Cloud console, enable the Meet REST API.
Confirm that you're enabling the Meet REST API in the correct Cloud project, then click Next.
Confirm that you're enabling the Meet REST API, then click Enable.
gcloud CLI
If necessary, set the current Cloud project to the one you created:
gcloud config set project PROJECT_ID
Replace PROJECT_ID with the Project ID of the Cloud project you created.
Enable the Meet REST API:
gcloud services enable meet.googleapis.com
Generate OAuth tokens
To connect to the Meet Media API, your app must use OAuth to generate access tokens. To learn more about accessing Google APIs with OAuth, see Using OAuth 2.0 to Access Google APIs.
When building a web app, you can generate OAuth tokens using the implicit grant flow. This TypeScript sample uses this flow to generate OAuth tokens.
Run the sample
Within the
web/samples
directory, build the sample:$ yarn install --frozen-lockfile $ webpack
Follow the Authenticate for using the gcloud CLI guide to sign in and select your Google Cloud project.
Deploy your server to Google App Engine.
$ gcloud app deploy app.yaml
Navigate to your endpoint:
$ gcloud app browse
Follow the Create access credentials guide to create OAuth 2.0 credentials with these scopes:
https://www.googleapis.com/auth/meetings.conference.media.readonly
https://www.googleapis.com/auth/meetings.space.readonly
Add your deployed app's URL to Authorized JavaScript Origins and Authorized Redirect URIs.
Copy the client ID and paste it into the deployed web page.
Tap the sign-in button and follow the prompts. If you run into an error, note that it might take a few minutes for the redirect URIs to propagate.
Create and join a meeting. Copy the meeting code, pasting it into the "meeting code" input on the page.
Select the number of video streams and enable audio.
Click Create Client, then Join Meeting.
Observe the video and audio streams.