Google Chat 앱이 데이터를 가져오도록 승인하기
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Google Chat API를 사용하면 앱이 가져오기 모드 스페이스를 사용하여 다른 메시지 플랫폼에서 Google Chat으로 데이터를 가져올 수 있습니다. 자세한 내용은 다른 서비스에서 Google Chat으로 메시지 데이터 가져오기를 참고하세요.
가져오기 모드 스페이스에서 리소스를 읽고 쓰려면 서비스 계정으로 Chat 앱을 인증해야 합니다.
관리자가 서비스 계정에 다음 Chat API 승인 범위를 부여합니다. https://www.googleapis.com/auth/chat.import
Google Workspace 도메인 관리자만 도메인 전체 위임을 통해 서비스 계정에 이 OAuth 범위를 부여할 수 있습니다.
Chat 앱이 가져오기 모드 스페이스를 만드는 모든 도메인에는 이 OAuth 범위가 있어야 합니다. 서비스 계정에 이 범위에 대한 도메인 전체 권한이 위임되면 채팅 앱은 사용자 계정을 가장하여 가져오기 모드 스페이스에 액세스할 수 있습니다.
일부 시나리오에서는 가장에 사용되는 사용자 계정을 더 이상 사용할 수 없습니다. 이러한 경우 채팅 앱은 서비스 계정 사용자 인증 정보를 대체로 사용할 수 있습니다. 예를 들어 메시지 생성 중에 사용된 사용자 계정을 삭제하면 Chat 앱에서 자체 서비스 계정 사용자 인증 정보를 사용하여 동일한 콘텐츠가 포함된 메시지를 만들 수 있습니다. Chat 앱은 다음 OAuth 범위(https://www.googleapis.com/auth/chat.bot
)를 사용하여 서비스 계정 사용자 인증 정보로 가져오기 모드 스페이스에 앱으로 액세스할 수 있습니다.
리소스를 가져오기 모드 스페이스로 가져올 때는 다른 Google Chat API 범위가 필요하지 않습니다.
채팅 앱은 자신이 만든 가져오기 모드 스페이스에만 콘텐츠를 가져올 수 있으며 다른 앱에서 만든 가져오기 모드 스페이스에는 콘텐츠를 가져올 수 없습니다.
다음 표에는 채팅 앱이 가져오기 모드 스페이스에서 호출할 수 있는 리소스 메서드와 지원되는 인증 유형이 나와 있습니다.
리소스 메서드 |
사용자 가장 지원 |
서비스 계정 사용자 인증 정보 지원 |
spaces.create
|
예 |
아니요 |
spaces.get
|
아니요 |
예 |
spaces.update
|
예 |
아니요 |
spaces.delete
|
예 |
아니요 |
spaces.completeImport
|
예 |
아니요 |
spaces.messages.create
|
예 |
예 |
spaces.messages.delete
|
예 |
예 |
spaces.messages.get
|
아니요 |
예 |
spaces.messages.list
|
예 |
아니요 |
spaces.messages.update
|
예 |
예 |
spaces.messages.reactions.create
|
예 |
아니요 |
spaces.messages.reactions.delete
|
예 |
아니요 |
spaces.members.create
|
예 |
아니요 |
spaces.members.delete
|
예 |
아니요 |
spaces.members.list
|
예 |
아니요 |
media.upload
|
예 |
아니요 |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-29(UTC)
[null,null,["최종 업데이트: 2025-08-29(UTC)"],[[["\u003cp\u003eGoogle Chat API allows importing data from other platforms into Google Chat using import mode spaces.\u003c/p\u003e\n"],["\u003cp\u003eChat apps require specific authentication and authorization to read and write resources in these spaces, needing domain administrator approval.\u003c/p\u003e\n"],["\u003cp\u003eApps can impersonate user accounts or utilize their service account credentials for specific actions within import mode spaces.\u003c/p\u003e\n"],["\u003cp\u003eImport mode spaces support various resource methods with differing authentication requirements, as detailed in the provided table.\u003c/p\u003e\n"],["\u003cp\u003eChat apps can only import content into spaces they create and not into spaces created by other apps.\u003c/p\u003e\n"]]],["Apps use the Google Chat API's import mode to bring data from other platforms into Google Chat. This requires authentication with a service account granted the `https://www.googleapis.com/auth/chat.import` scope via domain-wide delegation by a Google Workspace admin. Apps can impersonate user accounts or use service account credentials (`https://www.googleapis.com/auth/chat.bot`). Only specific resource methods are supported in import mode spaces. Import mode is exclusive, meaning apps can only modify spaces they create.\n"],null,["# Authorize Google Chat apps to import data\n\nWith the Google Chat API, apps can import data from other messaging platforms into\nGoogle Chat by using *import mode* spaces. For more information, see\n[Import message data to Google Chat from another service](https://support.google.com/a/answer/13465849).\n\nTo read and write resources in import mode spaces, you must\n[authenticate Chat apps with a service account](/workspace/chat/authenticate-authorize-chat-app).\nGrant the service account the following Chat API authorization scope\nby an administrator: `https://www.googleapis.com/auth/chat.import`.\n\nOnly Google Workspace domain administrators can grant this OAuth scope to\nservice accounts through\n[domain-wide delegation](/identity/protocols/oauth2/service-account#delegatingauthority).\nEvery domain that a Chat app creates import mode spaces\nin must have this OAuth scope. After the service account has been delegated\ndomain-wide authority for this scope, Chat apps can access import\nmode spaces by\n[impersonating a user account](/identity/protocols/oauth2/service-account#authorizingrequests).\n\nIn some scenarios, the user account for impersonation might no longer be\navailable. In these cases, the Chat app can use their\nservice account credentials as a fallback. For example, if you delete a user\naccount that was used during message creation, the\nChat app can use their own service account credentials\nto create a message containing the same contents. Chat apps can\naccess import mode spaces as an app using service account credentials with the\nfollowing OAuth scope: `https://www.googleapis.com/auth/chat.bot`.\n\nNo other [Google Chat API scopes](/workspace/chat/authenticate-authorize#scopes)\nare required when importing resources into an import mode space.\nChat apps can only import content into the import mode spaces\nthat they create, and not into the import mode spaces created by other apps.\n\nThe following table lists the resource methods that Chat apps can\ncall in import mode spaces, and what kind of authentication they support:\n\n| Resource method | User impersonation supported | Service account credentials supported |\n|------------------------------------|------------------------------|---------------------------------------|\n| `spaces.create` | Yes | No |\n| `spaces.get` | No | Yes |\n| `spaces.update` | Yes | No |\n| `spaces.delete` | Yes | No |\n| `spaces.completeImport` | Yes | No |\n| `spaces.messages.create` | Yes | Yes |\n| `spaces.messages.delete` | Yes | Yes |\n| `spaces.messages.get` | No | Yes |\n| `spaces.messages.list` | Yes | No |\n| `spaces.messages.update` | Yes | Yes |\n| `spaces.messages.reactions.create` | Yes | No |\n| `spaces.messages.reactions.delete` | Yes | No |\n| `spaces.members.create` | Yes | No |\n| `spaces.members.delete` | Yes | No |\n| `spaces.members.list` | Yes | No |\n| `media.upload` | Yes | No |\n\nRelated topics\n--------------\n\n- To learn more about authentication and authorization, see [Authenticate and authorize Google Chat apps and API requests](/workspace/chat/authenticate-authorize).\n- To learn how to set up a service account to access the Google Chat API, see [Authenticate as a Google Chat app](/workspace/chat/authenticate-authorize-chat-app).\n- To learn how to start importing resources using import mode spaces, see [Import data to Google Chat](/workspace/chat/import-data)."]]