You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

求助:寻找Hangouts Chat创建房间的REST API端点

关于Hangouts Chat创建房间的API支持问题

Hey there, I’ve run into this exact confusion before, so let me break it down clearly for you:

First off, the original Hangouts Chat REST API does NOT have an official endpoint to create rooms directly — this is a known limitation that frustrated a lot of us back when it was active. But here’s the key update: Google has phased out Hangouts Chat in favor of Google Chat, which does offer full API support for creating spaces (the modern equivalent of Hangouts Chat rooms).

替代方案:使用Google Chat API创建空间

If you’re working within a Google Workspace environment (which is the supported path now), you can use the Google Chat API’s spaces.create endpoint to create a room-like space. Here’s what you need to know:

  • Required Permissions: You’ll need the chat.spaces.create OAuth scope (or if using a service account, enable Domain-Wide Delegation for this scope).
  • Example Request (cURL):
    curl -X POST "https://chat.googleapis.com/v1/spaces" \
      -H "Authorization: Bearer YOUR_OAUTH_ACCESS_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "displayName": "Project Kickoff Room",
        "spaceType": "ROOM" # Use "GROUP_CHAT" for smaller ad-hoc chats, "DIRECT_MESSAGE" for 1:1
      }'
    
  • Response: The API will return a Space object with details like the space name, ID, and link to access it.

如果你必须使用旧版Hangouts Chat

Unfortunately, there’s no official REST API way to create rooms here. Your only options would be:

  • Using client-side automation (like Selenium) to simulate user actions, but this is unsupported and prone to breakage as Google updates the interface.
  • Checking if your use case can be handled by Google Chat instead — since Hangouts Chat is being retired, migrating is the long-term sustainable path.

Hope this clears things up and gets you unblocked!

内容的提问来源于stack exchange,提问作者sarbada

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.29 07:17:49