通过托管 OAuth 集成 Google Meet API,创建会议室、查询会议记录并管理参会人员,适用于用户...
Google Meet : 访问 Google Meet API , 并管理 OAuth 认证. 创建和管理会议空间, 列出会议记录, 并检索参与者信息.是一项面向实际任务的技能,主要用于QQ 快速启动.;Base URL.。
从功能定位来看,该技能强调把分散的操作要求整理成清晰、可复用的处理流程,使用户能够围绕既定目标快速准备输入、选择执行方式并获得结构化结果。实际使用前应先确认任务范围、数据来源、运行环境、必要权限和关键参数,再依据技能说明逐步执行;
若输入条件不完整,应先补齐信息或采用保守配置,避免因错误假设导致结果偏离需求。执行过程中需要关注工具调用是否成功、接口或依赖是否可用、输出格式是否符合预期,并对异常提示、缺失字段和边界情况进行处理;涉及批量任务时,还应保存进度,避免中断后重复操作。
通过受管的 OAuth 认证访问 Google Meet API。创建并管理会议空间、列出会议记录,以及获取参会者信息。
# 创建会议空间
python <<'EOF'
import urllib.request, os, json
data = json.dumps({}).encode()
req = urllib.request.Request('https://api.maton.ai/google-meet/v2/spaces', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
https://api.maton.ai/google-meet/{native-api-path}
Maton 将请求代理至 meet.googleapis.com,并自动注入您的 OAuth 令牌。
所有请求均需在 Authorization 请求头中提供 Maton API 密钥:
Authorization: Bearer $MATON_API_KEY
环境变量:请将您的 API 密钥设为 MATON_API_KEY:
export MATON_API_KEY="YOUR_API_KEY"
在 https://api.maton.ai 管理您的 Google OAuth 连接。
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections?app=google-meet&status=ACTIVE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
python <<'EOF'
import urllib.request, os, json
data = json.dumps({'app': 'google-meet'}).encode()
req = urllib.request.Request('https://api.maton.ai/connections', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections/{connection_id}')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
响应示例:
{
"connection": {
"connection_id": "{connection_id}",
"status": "ACTIVE",
"creation_time": "2025-12-08T07:20:53.488460Z",
"last_updated_time": "2026-01-31T20:03:32.593153Z",
"url": "https://connect.maton.ai/?session_token=...",
"app": "google-meet",
"metadata": {}
}
}
在浏览器中打开返回的 url,完成 OAuth 授权流程。
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections/{connection_id}', method='DELETE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
若您拥有多个 Google Meet 连接,请使用 Maton-Connection 请求头明确指定所用连接:
python <<'EOF'
import urllib.request, os, json
data = json.dumps({}).encode()
req = urllib.request.Request('https://api.maton.ai/google-meet/v2/spaces', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
req.add_header('Maton-Connection', '{connection_id}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
若存在多个连接,务必始终包含该请求头,以确保请求被路由至目标账户。
POST /google-meet/v2/spaces
Content-Type: application/json
{}
响应示例:
{
"name": "spaces/abc123",
"meetingUri": "https://meet.google.com/abc-defg-hij",
"meetingCode": "abc-defg-hij",
"config": {
"accessType": "OPEN",
"entryPointAccess": "ALL"
}
}
GET /google-meet/v2/spaces/{spaceId}
PATCH /google-meet/v2/spaces/{spaceId}
Content-Type: application/json
{
"config": {
"accessType": "TRUSTED"
}
}
POST /google-meet/v2/spaces/{spaceId}:endActiveConference
GET /google-meet/v2/conferenceRecords
带过滤条件:
GET /google-meet/v2/conferenceRecords?filter=space.name="spaces/abc123"
GET /google-meet/v2/conferenceRecords/{conferenceRecordId}
GET /google-meet/v2/conferenceRecords/{conferenceRecordId}/participants
GET /google-meet/v2/conferenceRecords/{conferenceRecordId}/participants/{participantId}
GET /google-meet/v2/conferenceRecords/{conferenceRecordId}/participants/{participantId}/participantSessions
GET /google-meet/v2/conferenceRecords/{conferenceRecordId}/recordings
GET /google-meet/v2/conferenceRecords/{conferenceRecordId}/recordings/{recordingId}
GET /google-meet/v2/conferenceRecords/{conferenceRecordId}/transcripts
GET /google-meet/v2/conferenceRecords/{conferenceRecordId}/transcripts/{transcriptId}
GET /google-meet/v2/conferenceRecords/{conferenceRecordId}/transcripts/{transcriptId}/entries
// 创建会议空间
const response = await fetch(
'https://api.maton.ai/google-meet/v2/spaces',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${process.env.MATON_API_KEY}`
},
body: JSON.stringify({})
}
);
const space = await response.json();
console.log(`Meeting URL: ${space.meetingUri}`);
import os
import requests
headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'
}
# 创建会议空间
response = requests.post(
'https://api.maton.ai/google-meet/v2/spaces',
headers=headers,
json={}
)
space = response.json()
print(f"Meeting URL: {space['meetingUri']}")
OPEN(任何持有链接者均可加入)、TRUSTED(仅限组织成员)、RESTRICTED(仅限受邀者)curl -g 参数禁用 glob 解析jq 或其他命令时,在某些 shell 环境中,$MATON_API_KEY 等环境变量可能无法正确展开,从而导致“Invalid API key”错误| 状态码 | 含义 |
|---|---|
| 400 | 缺少 Google Meet 连接 |
| 401 | Maton API 密钥无效或缺失 |
| 429 | 请求频率受限(每个账户 10 次/秒) |
| 4xx/5xx | 来自 Google Meet API 的透传错误 |
当收到 “Invalid API key” 错误时,请务必按以下步骤逐一排查,再判断是否存在其他问题:
MATON_API_KEY 环境变量是否已设置:echo $MATON_API_KEY
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
google-meet 开头。例如:https://api.maton.ai/google-meet/v2/spaceshttps://api.maton.ai/meet/v2/spaces