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:
gcloudconfigsetprojectPROJECT_ID
Replace PROJECT_ID with the Project ID of the
Cloud project you created.
Enable the Meet REST API:
gcloudservicesenablemeet.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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-04 UTC."],[],[],null,["| **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. \n|\n| **To use the Meet Media API to access real-time media from a conference, the Google Cloud project, OAuth principal, and all participants in the conference must be enrolled in the Developer Preview Program.**\n\nThis page explains how to set up and run a sample using the [TypeScript\nreference client\nimplementation](https://github.com/googleworkspace/meet-media-api-samples). To\nlearn about the C++ client instead, see the [C++ reference client\nquickstart](/workspace/meet/media-api/guides/cpp).\n\nPrerequisites\n\nTo run this quickstart, you need the following prerequisites:\n\n- You've cloned the [GitHub\n repository](https://github.com/googleworkspace/meet-media-api-samples).\n- [Webpack](https://webpack.js.org/).\n- [Node.js](https://nodejs.org).\n- [Yarn](https://classic.yarnpkg.com/lang/en/docs/install).\n- [`gcloud`](https://cloud.google.com/sdk/docs/install-sdk) CLI.\n- [A Google Cloud project](/workspace/guides/create-project) with Google Meet REST API enabled.\n- A Google Workspace account.\n- Use a Chrome browser with version \\\u003e= 94.\n\nEnable 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. \n\nGoogle Cloud console\n\n1. In the Google Cloud console, enable the Meet REST API.\n\n [Enable the APIs](https://console.cloud.google.com/flows/enableapi?apiid=meet.googleapis.com)\n2. Confirm that you're enabling the Meet REST API in the correct\n Cloud project, then click **Next**.\n\n3. Confirm that you're enabling the Meet REST API, then click\n **Enable**.\n\ngcloud CLI\n\n1. If necessary, set the current Cloud project to the one you\n created:\n\n gcloud config set project \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with the **Project ID** of the\n Cloud project you created.\n2. Enable the Meet REST API:\n\n gcloud services enable meet.googleapis.com\n\nGenerate OAuth tokens\n\nTo connect to the Meet Media API, your app must use OAuth to generate\naccess tokens. To learn more about accessing Google APIs with OAuth, see [*Using\nOAuth 2.0 to Access Google APIs*](/identity/protocols/oauth2).\n\nWhen building a web app, you can generate OAuth tokens using the [implicit grant\nflow](/identity/protocols/oauth2/javascript-implicit-flow). This TypeScript\nsample uses this flow to generate OAuth tokens.\n\nRun the sample **Note:** Due to CORS requirements, you must deploy this sample for it to call the Meet REST API. `localhost` won't work. We recommend deploying the sample to [*Google App Engine*](https://cloud.google.com/appengine).\n\n1. [Create an OAuth client](/identity/protocols/oauth2/javascript-implicit-flow#prerequisites)\n\n2. Within the `web/samples` directory, build the sample:\n\n $ yarn install --frozen-lockfile\n $ webpack\n\n3. Follow the\n [*Authenticate for using the gcloud CLI*](https://cloud.google.com/docs/authentication/gcloud)\n guide to sign in and select your Google Cloud project.\n\n4. Deploy your server to [*Google App Engine*](https://cloud.google.com/appengine).\n\n $ gcloud app deploy app.yaml\n\n5. Navigate to your endpoint:\n\n $ gcloud app browse\n\n6. Follow the [*Create access credentials*](/workspace/guides/create-credentials#oauth-client-id)\n guide to create OAuth 2.0 credentials with these scopes:\n\n - `https://www.googleapis.com/auth/meetings.conference.media.readonly`\n - `https://www.googleapis.com/auth/meetings.space.readonly`\n\n Add your deployed app's URL to *Authorized JavaScript Origins* and\n *Authorized Redirect URIs*.\n7. Copy the client ID and paste it into the deployed web page.\n\n8. Tap the sign-in button and follow the prompts. If you run into an error,\n note that it might take a few minutes for the redirect URIs to propagate.\n\n9. [Create and join a meeting](https://meet.google.com/new). Copy the meeting\n code, pasting it into the \"meeting code\" input on the page.\n\n10. Select the number of video streams and enable audio.\n\n11. Click *Create Client* , then *Join Meeting*.\n\n12. Observe the video and audio streams.\n\nRelated topics\n\n- [Troubleshoot and fix Meet Media API errors](/workspace/meet/media-api/guides/troubleshoot)\n\n- [Meet Media API data channels reference](/workspace/meet/media-api/reference/dc/media_api)"]]