Method: spaces.create
스페이스를 만듭니다. 이름이 지정된 스페이스 또는 Import mode
에서 그룹 채팅을 만드는 데 사용할 수 있습니다. 예시는 스페이스 만들기를 참고하세요.
다음 유형의 인증을 지원합니다.
앱으로 인증할 때는 요청에 space.customer
필드를 설정해야 합니다.
생성 시 스페이스 멤버십은 스페이스가 Import mode
에서 생성되었는지에 따라 다릅니다.
- 가져오기 모드: 구성원이 생성되지 않습니다.
- 기타 모든 모드: 호출 사용자가 구성원으로 추가됩니다. 이는 다음과 같습니다.
- 앱 인증을 사용하는 경우 앱 자체입니다.
- 사용자 인증을 사용하는 실제 사용자입니다.
스페이스를 만들 때 ALREADY_EXISTS
오류 메시지가 표시되면 다른 displayName
를 사용해 보세요. Google Workspace 조직 내의 기존 스페이스에서 이미 이 표시 이름을 사용하고 있을 수 있습니다.
HTTP 요청
POST https://chat.googleapis.com/v1/spaces
URL은 gRPC 트랜스코딩 구문을 사용합니다.
쿼리 매개변수
매개변수 |
requestId |
string
선택사항입니다. 이 요청의 고유 식별자입니다. 임의의 UUID를 사용하는 것이 좋습니다. 기존 요청 ID를 지정하면 새 스페이스를 만드는 대신 해당 ID로 생성된 스페이스가 반환됩니다. 인증된 사용자가 다른 동일한 Chat 앱에서 기존 요청 ID를 지정하면 오류가 반환됩니다.
|
요청 본문
요청 본문에 Space
의 인스턴스가 포함됩니다.
응답 본문
성공한 경우 응답 본문에 새로 생성된 Space
의 인스턴스가 포함됩니다.
승인 범위
다음 OAuth 범위 중 하나가 필요합니다.
https://www.googleapis.com/auth/chat.app.spaces.create
https://www.googleapis.com/auth/chat.app.spaces
https://www.googleapis.com/auth/chat.import
https://www.googleapis.com/auth/chat.spaces
https://www.googleapis.com/auth/chat.spaces.create
자세한 내용은 승인 가이드를 참고하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-02-27(UTC)
[null,null,["최종 업데이트: 2025-02-27(UTC)"],[[["Creates a space in Google Chat, which can be a named space or a group chat, supporting app and user authentication."],["When using app authentication, the space.customer field is required and no members are added in Import mode; otherwise, the calling user becomes a member."],["Uses the `POST https://chat.googleapis.com/v1/spaces` HTTP request to create a space and requires specific OAuth scopes for authorization."],["The request body should contain a Space object and the response, if successful, will contain the newly created Space object."],["If the displayName already exists, an `ALREADY_EXISTS` error will be returned, suggesting to try a different displayName."]]],["This content outlines how to create a space using the Chat API. Key actions include sending a `POST` request to `https://chat.googleapis.com/v1/spaces`. The request may include a unique `requestId` and must contain a `Space` instance in the body. Authentication can be app-based or user-based, requiring specific OAuth scopes. Space membership varies by import mode; no members in import mode, otherwise the caller is added. Response will contain new space information.\n"]]