























@@ -437,8 +437,51 @@ OAuth is optional for creating a Meet link because `googlemeet create` can fall
437437back to browser automation. Configure OAuth when you want official API create,
438438space resolution, or Meet Media API preflight checks.
439439440-Google Meet API access uses a personal OAuth client first. Configure
441-`oauth.clientId` and optionally `oauth.clientSecret`, then run:
440+Google Meet API access uses user OAuth: create a Google Cloud OAuth client,
441+request the required scopes, authorize a Google account, then store the
442+resulting refresh token in the Google Meet plugin config or provide the
443+`OPENCLAW_GOOGLE_MEET_*` environment variables.
444+445+OAuth does not replace the Chrome join path. Chrome and Chrome-node transports
446+still join through a signed-in Chrome profile, BlackHole/SoX, and a connected
447+node when you use browser participation. OAuth is only for the official Google
448+Meet API path: create meeting spaces, resolve spaces, and run Meet Media API
449+preflight checks.
450+451+### Create Google credentials
452+453+In Google Cloud Console:
454+455+1. Create or select a Google Cloud project.
456+2. Enable **Google Meet REST API** for that project.
457+3. Configure the OAuth consent screen.
458+- **Internal** is simplest for a Google Workspace organization.
459+- **External** works for personal/test setups; while the app is in Testing,
460+ add each Google account that will authorize the app as a test user.
461+4. Add the scopes OpenClaw requests:
462+- `https://www.googleapis.com/auth/meetings.space.created`
463+- `https://www.googleapis.com/auth/meetings.space.readonly`
464+- `https://www.googleapis.com/auth/meetings.conference.media.readonly`
465+5. Create an OAuth client ID.
466+- Application type: **Web application**.
467+- Authorized redirect URI:
468+469+```text
470+ http://localhost:8085/oauth2callback
471+ ```
472+473+6. Copy the client ID and client secret.
474+475+`meetings.space.created` is required by Google Meet `spaces.create`.
476+`meetings.space.readonly` lets OpenClaw resolve Meet URLs/codes to spaces.
477+`meetings.conference.media.readonly` is for Meet Media API preflight and media
478+work; Google may require Developer Preview enrollment for actual Media API use.
479+If you only need browser-based Chrome joins, skip OAuth entirely.
480+481+### Mint the refresh token
482+483+Configure `oauth.clientId` and optionally `oauth.clientSecret`, or pass them as
484+environment variables, then run:
442485443486```bash
444487openclaw googlemeet auth login --json
@@ -448,11 +491,116 @@ The command prints an `oauth` config block with a refresh token. It uses PKCE,
448491localhost callback on `http://localhost:8085/oauth2callback`, and a manual
449492copy/paste flow with `--manual`.
450493494+Examples:
495+496+```bash
497+OPENCLAW_GOOGLE_MEET_CLIENT_ID="your-client-id" \
498+OPENCLAW_GOOGLE_MEET_CLIENT_SECRET="your-client-secret" \
499+openclaw googlemeet auth login --json
500+```
501+502+Use manual mode when the browser cannot reach the local callback:
503+504+```bash
505+OPENCLAW_GOOGLE_MEET_CLIENT_ID="your-client-id" \
506+OPENCLAW_GOOGLE_MEET_CLIENT_SECRET="your-client-secret" \
507+openclaw googlemeet auth login --json --manual
508+```
509+510+The JSON output includes:
511+512+```json
513+{
514+"oauth": {
515+"clientId": "your-client-id",
516+"clientSecret": "your-client-secret",
517+"refreshToken": "refresh-token",
518+"accessToken": "access-token",
519+"expiresAt": 1770000000000
520+ },
521+"scope": "..."
522+}
523+```
524+525+Store the `oauth` object under the Google Meet plugin config:
526+527+```json5
528+{
529+ plugins: {
530+ entries: {
531+"google-meet": {
532+ enabled: true,
533+ config: {
534+ oauth: {
535+ clientId: "your-client-id",
536+ clientSecret: "your-client-secret",
537+ refreshToken: "refresh-token",
538+ },
539+ },
540+ },
541+ },
542+ },
543+}
544+```
545+546+Prefer environment variables when you do not want the refresh token in config.
547+If both config and environment values are present, the plugin resolves config
548+first and then environment fallback.
549+451550The OAuth consent includes Meet space creation, Meet space read access, and Meet
452551conference media read access. If you authenticated before meeting creation
453552support existed, rerun `openclaw googlemeet auth login --json` so the refresh
454553token has the `meetings.space.created` scope.
455554555+### Verify OAuth with doctor
556+557+Run the OAuth doctor when you want a fast, non-secret health check:
558+559+```bash
560+openclaw googlemeet doctor --oauth --json
561+```
562+563+This does not load the Chrome runtime or require a connected Chrome node. It
564+checks that OAuth config exists and that the refresh token can mint an access
565+token. The JSON report includes only status fields such as `ok`, `configured`,
566+`tokenSource`, `expiresAt`, and check messages; it does not print the access
567+token, refresh token, or client secret.
568+569+Common results:
570+571+| Check | Meaning |
572+| -------------------- | --------------------------------------------------------------------------------------- |
573+| `oauth-config` | `oauth.clientId` plus `oauth.refreshToken`, or a cached access token, is present. |
574+| `oauth-token` | The cached access token is still valid, or the refresh token minted a new access token. |
575+| `meet-spaces-get` | Optional `--meeting` check resolved an existing Meet space. |
576+| `meet-spaces-create` | Optional `--create-space` check created a new Meet space. |
577+578+To prove Google Meet API enablement and `spaces.create` scope as well, run the
579+side-effecting create check:
580+581+```bash
582+openclaw googlemeet doctor --oauth --create-space --json
583+openclaw googlemeet create --no-join --json
584+```
585+586+`--create-space` creates a throwaway Meet URL. Use it when you need to confirm
587+that the Google Cloud project has the Meet API enabled and that the authorized
588+account has the `meetings.space.created` scope.
589+590+To prove read access for an existing meeting space:
591+592+```bash
593+openclaw googlemeet doctor --oauth --meeting https://meet.google.com/abc-defg-hij --json
594+openclaw googlemeet resolve-space --meeting https://meet.google.com/abc-defg-hij
595+```
596+597+`doctor --oauth --meeting` and `resolve-space` prove read access to an existing
598+space that the authorized Google account can access. A `403` from these checks
599+usually means the Google Meet REST API is disabled, the consented refresh token
600+is missing the required scope, or the Google account cannot access that Meet
601+space. A refresh-token error means rerun `openclaw googlemeet auth login
602+--json` and store the new `oauth` block.
603+456604No OAuth credentials are needed for the browser fallback. In that mode, Google
457605auth comes from the signed-in Chrome profile on the selected node, not from
458606OpenClaw config.
@@ -967,7 +1115,10 @@ Also verify:
9671115`googlemeet doctor [session-id]` prints the session, node, in-call state,
9681116manual action reason, realtime provider connection, `realtimeReady`, audio
9691117input/output activity, last audio timestamps, byte counters, and browser URL.
970-Use `googlemeet status [session-id]` when you need the raw JSON.
1118+Use `googlemeet status [session-id]` when you need the raw JSON. Use
1119+`googlemeet doctor --oauth` when you need to verify Google Meet OAuth refresh
1120+without exposing tokens; add `--meeting` or `--create-space` when you need a
1121+Google Meet API proof as well.
97111229721123If an agent timed out and you can see a Meet tab already open, inspect that tab
9731124without opening another one:
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。