Chat 用アプリの構成時に、エラー Google Chat API is only available to Google Workspace users が表示されることがあります。このメッセージは、Chat API の設定に使用した Google アカウントが Google Workspace 組織に属していないことを意味します。Chat 用アプリをビルドしたり、Chat API を使用したりするには、Google Workspace アカウントを使用する必要があります。
Google Chat ユーザーは、Google Workspace アカウントがなくても Chat 用アプリを使用できます。ユーザーが Chat 用アプリを見つけてインストールする方法について詳しくは、インタラクティブな Google Chat 用アプリを作成するをご覧ください。
ユーザーがスペースから退出させられるケース
Google Workspace 管理者がユーザーによるチャット履歴のオンとオフの切り替えを禁止している場合、チャット履歴のオンとオフを強制するユーザーレベルの設定と、組織レベルの強制設定を継承するスペースとの間で競合が発生し、ユーザーがスペースに参加できなかったり、スペースから退出させられたりすることがあります。
<HttpError 403 when requesting https://chat.googleapis.com/v1/spaces/{space}?alt=json returned "The administrator must grant the app the required OAuth authorization scope for this action.". Details: "The administrator must grant the app the required OAuth authorization scope for this action.">
Google Workspace 管理者に、Chat 用アプリの承認を付与するよう依頼します。Chat 用アプリのロジックでこのエラーを処理する場合は、Chat 用アプリがリクエストされたアクションを実行するには管理者の承認が必要であることを知らせるメッセージを送信することを検討してください。たとえば、次のようなメッセージです。To perform this action, I need approval.
<https://support.google.com/a?p=chat-app-auth|Learn more>.
Chat API メソッドが https://www.googleapis.com/auth/chat.bot 認可スコープ(管理者による承認は不要)をサポートしている場合は、代わりにそのスコープの使用を検討してください。メソッドがサポートする認可スコープを確認するには、Google Chat アプリと Google Chat API リクエストの認証と認可をご覧ください。
Cloud Functions をデプロイすると、Function
ChatApp in region REGION_NAME in project PROJECT_NAME already
exists エラーが発生することがあります。このメッセージは、デプロイする Cloud Functions と同じ名前の Cloud Functions がすでに存在することを示しています。名前を変更して、関数を再度デプロイします。Chat 用アプリが、既存の Cloud Functions 関数のトリガー URL ではなく、Cloud Functions 関数のトリガー URL を使用していることを確認します。
ポリシーで指定されたユーザーの 1 人以上が、許可された顧客に属していません
Cloud Functions をデプロイするときに、The operation
cannot be completed on the function: "One or more users named in the policy do
not belong to a permitted customer." エラーが発生することがあります。このエラーが発生した後に Chat 用アプリにメッセージを送信すると、Google Chat が Cloud Functions をホストしているサーバーにアクセスできないため、アプリが応答していないというエラーが表示されます。このメッセージは、「allUsers」という名前のユーザーには Cloud Functions を呼び出す権限がないことを意味します。「allUsers」に「Cloud Functions 起動元」ロールを付与すると、アプリを動かす Cloud Functions が一般公開され、認証なしでアクセスできるようになります。ロールを割り当てる方法については、単一のロールを付与するをご覧ください。
このエラーは、Google Cloud プロジェクトがドメイン制限されていることを意味する可能性があります。ドメイン制限の制約の詳細については、ドメイン別の ID の制限をご覧ください。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-08-04 UTC。"],[[["\u003cp\u003eThis guide addresses common problems encountered while building and testing Google Chat apps, such as cards not rendering, apps not responding, and user access issues.\u003c/p\u003e\n"],["\u003cp\u003eTroubleshooting steps include verifying the Chat app's configuration in the Google Cloud console, ensuring the app is live and interactive features are enabled.\u003c/p\u003e\n"],["\u003cp\u003eUsers encountering access issues should check if the Chat app is allowed by their organization's administrator and has the necessary OAuth authorization scopes.\u003c/p\u003e\n"],["\u003cp\u003eFor Cloud Function-based apps, detailed guidance on checking logs, identifying errors, and fixing common Cloud Function errors like naming conflicts and permission issues is provided.\u003c/p\u003e\n"],["\u003cp\u003eUsers may be excluded from spaces due to conflicting Chat history settings between user-level and space-level configurations.\u003c/p\u003e\n"]]],["This document outlines common issues and troubleshooting steps for Chat apps. Key actions include: verifying app configurations in the Google Cloud Console, ensuring appropriate interactive features are enabled, and confirming correct connection settings. It highlights the necessity of a Google Workspace account for Chat API use and addresses user exclusion from spaces due to conflicting history settings. Other fixes include checking Cloud Function logs, resolving deployment errors, and ensuring proper user permissions for app access. Lastly, it also details on how to solve administrator OAuth errors.\n"],null,["This section describes common issues that you can encounter while building and testing Chat apps.\n\nA card message, dialog, or link preview doesn't render or work as expected\n\nFor help troubleshooting card errors, see [Troubleshoot and fix cards](/workspace/chat/troubleshoot-cards).\n\nApp is not responding\n\nIf you message the Chat app and it responds \"App is not responding,\"\nverify the Chat app's configuration:\n\n1. In the Google Cloud console, click **Menu**\n menu\n \\\u003e **More products**\n \\\u003e **Google Workspace**\n \\\u003e **Product Library**\n \\\u003e **Google Chat API**\n \\\u003e **Manage**\n \\\u003e **Configuration**.\n\n [Go to Chat API](https://console.cloud.google.com/apis/api/chat.googleapis.com/hangouts-chat)\n2. Under **App status** , make sure that you selected **Live - available to users**.\n\n3. Under **Interactive features** , make sure that settings are appropriate for your app's functionality. If your Chat app interacts with users, make sure you turn on **Enable interactive features**:\n\n 1. By default, apps can respond to direct messages from users.\n 2. If your app responds to messages in spaces and group chats, select **Join spaces and group conversations**.\n 3. Under **Connection settings** , make sure the **HTTP endpoint URL** , Apps Script project **Deployment ID** , Cloud Pub/Sub **Topic Name**, or Dialogflow agent is set correctly and that it is deployed.\n 4. Under **Visibility** , make sure the appropriate users have access to the app with email address or a group in the Google Workspace domain. If the app is deployed with [Google Workspace Marketplace SDK](/workspace/marketplace/overview), visibility settings aren't necessary because Google Workspace Marketplace settings take precedence.\n4. If the app is published with [Google Workspace Marketplace SDK](/workspace/marketplace/overview), review Google Workspace Marketplace settings.\n\n5. Click **Save**.\n\n6. Try messaging the app again.\n\nGoogle Chat API is only available to Google Workspace users\n\nWhen configuring the Chat app, you might receive the\nerror `Google Chat API is only available to Google Workspace users`. This message\nmeans that the Google Account that you've used to configure the\nChat API isn't part of a Google Workspace organization. To build a\nChat app or use the Chat API, you must use a\n[Google Workspace\naccount](https://workspace.google.com/features/).\n\nNote that Google Chat users can use Chat apps without a\nGoogle Workspace account. To learn more about how users discover and install\nChat apps, see\n[Build interactive Google Chat apps](/workspace/chat/interact-users-overview).\n\nUsers can be excluded from spaces\n\nIf a Google Workspace administrator [disallows users to turn Chat history on or off](https://support.google.com/a/answer/7664184), then there might be times when users can't join or stay in a space due to a conflict between a user-level setting that forces chat history on or off and a space that inherits the organization-level forced setting.\n\nFor example, if a user has a Chat history setting forced \"on\" and a space has a Chat history setting forced \"off\", then that user might not be able to join the space. Additionally, that user might be removed from the space if they joined prior to the conflict and then they post a message in the space after the conflict.\n\nIn this scenario, and other scenarios where there are conflicts between history settings, Chat API might not be able to create a membership, or creating a message with user authentication might remove the authenticated user with a conflicting Chat history setting from the space.\n\nTo learn more, see [Users can be excluded from spaces](https://support.google.com/a/answer/9948515#zippy=%2Cmy-top-level-setting-is-chat-preferred) in the Google Workspace Admin Help center.\n\nTroubleshoot the Advanced Chat service in Google Apps Script\n\nSee the Apps Script page about the\n[Advanced Chat Service](/apps-script/advanced/chat#troubleshoot).\n\nUsers are unable to add a Chat app to a space\n\nIf users encounter the error message\n`This organization's administrator must allow users to install this Chat app`\nwhen trying to add a Chat app to a space, this error\nmight be caused by one of the following reasons:\n\n- The organization has disabled Chat apps.\n- The organization hasn't added this specific Chat app to the organization's allowlist.\n\nIf a user encounters this error message when trying to interact with a\nChat app, it might be caused by the organization\ngranting access to a sub-organizational unit, without enabling it for the\nparent organizational unit.\n\nFor information about how to resolve this issue, see\n[Allow users to install Chat apps](https://support.google.com/a/answer/7651360).\n\nThe administrator must grant the app the required OAuth authorization scope for this action\n\nWhen\n[authenticating as a Chat app](/workspace/chat/authenticate-authorize-chat-user),\nyou might receive the following error: \n\n \u003cHttpError 403 when requesting https://chat.googleapis.com/v1/spaces/{space}?alt=json returned \"The administrator must grant the app the required OAuth authorization scope for this action.\". Details: \"The administrator must grant the app the required OAuth authorization scope for this action.\"\u003e\n\nThis error message means that a Google Workspace administrator hasn't\nyet granted one-time approval to the Chat app to use\nauthorization scopes that begin with the name\n`https://www.googleapis.com/auth/chat.app.*`.\n\nTo resolve the error:\n\n- Ask the Google Workspace administrator to [grant approval to your Chat app](https://support.google.com/a?p=chat-app-auth). When handling this error in your Chat app logic, consider [sending a message](/workspace/chat/create-messages) announcing that the Chat app needs administrator approval to perform the requested action, perhaps: `To perform this action, I need approval.\n \u003chttps://support.google.com/a?p=chat-app-auth|Learn more\u003e.`\n- If the Chat API method supports the `https://www.googleapis.com/auth/chat.bot` authorization scope, which doesn't require administrator approval, consider using it instead. To check which authorization scopes a method supports, see the [Authenticate and authorize Google Chat apps and Google Chat API requests](/workspace/chat/authenticate-authorize#asynchronous-chat-calls).\n\nTroubleshoot Cloud Function errors\n\nIf the Chat app is implemented with Cloud Functions and\nit isn't working, the following sections help troubleshoot and fix the issue.\n\nCheck Cloud Function logs\n\nAs a first step, check the Cloud Functions logs for errors.\n\n1. In the Google Cloud console, go to the Cloud Functions page:\n\n [Go to Cloud Functions](https://console.cloud.google.com/functions)\n2. To open the logs, find your Chat app's Cloud\n Function, then click\n **Show actions** more_vert\n \\\u003e **View logs**.\n\nThe Logs Explorer opens and runs a query showing Cloud Function logs, including\nerrors.\n\nIf the default information logged is not enough to debug your app, you can add\nadditional logging from your Cloud Function code. See [View and write Cloud\nFunction logs](https://cloud.google.com/functions/docs/monitoring/logging).\n\nCheck Cloud Function errors\n\nApart from the logs, Cloud Function might also report errors encountered while\nrunning.\n\n1. In the Google Cloud console, go to the Cloud Functions page:\n\n [Go to Cloud Functions](https://console.cloud.google.com/functions)\n2. Click your Chat app's Cloud Function.\n\n3. On the Function details page, errors are listed under **Errors**.\n\n4. To further troubleshoot an error, click it.\n\nFix common Cloud Function errors\n\nThe following errors are sometimes encountered when building a\nChat app with Cloud Functions.\n\nFunction ChatApp in region \u003cvar translate=\"no\"\u003eREGION_NAME\u003c/var\u003e in project \u003cvar translate=\"no\"\u003ePROJECT_NAME\u003c/var\u003e already exists\n\nWhen deploying a Cloud Function, you might receive the error `Function\nChatApp in region `\u003cvar translate=\"no\"\u003eREGION_NAME\u003c/var\u003e` in project `\u003cvar translate=\"no\"\u003ePROJECT_NAME\u003c/var\u003e` already\nexists`. This message means that another Cloud Function has the same name as the\none you're deploying. Change the name, and\ndeploy the function again. Verify that the Chat app uses the Trigger URL for\nyour Cloud Function, not the Trigger URL of the preexisting Cloud Function.\n\nOne or more users named in the policy do not belong to a permitted customer\n\nWhen deploying a Cloud Function, you might receive the error `The operation\ncannot be completed on the function: \"One or more users named in the policy do\nnot belong to a permitted customer.\"` If you get this error and then message the\nChat app, you get an error saying that the app isn't responding because Google\nChat can't reach the server hosting the Cloud Function. This message means that\na user named \"allUsers\" doesn't have permission to call the Cloud Function.\nGiving \"allUsers\" the \"Cloud Functions Invoker\" role means that the Cloud\nFunction that powers the app is publicly available and accessible without\nauthentication. To learn how to assign a role, see\n[Grant a single role](https://cloud.google.com/iam/docs/granting-changing-revoking-access#grant-single-role).\n\nThis error might mean that the Google Cloud project is domain restricted. For\nmore information about domain restriction constraints, refer to\n[Restricting identities by domain](https://cloud.google.com/resource-manager/docs/organization-policy/restricting-domains#console_1).\n\nTo resolve this issue, verify that your Cloud Function allows unauthenticated\ninvocations. To learn how to allow unauthenticated invocations for an existing\nCloud Function, refer to\n[Allowing public (unauthenticated) access](https://cloud.google.com/run/docs/authenticating/public)."]]