Google Workspace API の認証情報を管理する
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
認証情報は、アプリが Google Workspace API を呼び出せるように、Google の認可サーバーからアクセス トークンを取得するために使用されます。Google Workspace API の場合、OAuth 2.0 認証情報とサービス アカウント認証情報を管理できます。
認証情報を表示
すべての Google Workspace API または個々の Google Workspace API で有効になっている認証情報のリストを表示するには、次の操作を行います。
Google Cloud コンソールで、メニュー menu
> [その他のプロダクト] > [Google Workspace] > [認証情報] をクリックします。
Google Workspace に移動
個々の Google Workspace API を選択するには、[すべての Google Workspace API] をクリックして API を選択します。
認証情報を編集する
認証情報を作成した後、認証情報の一部を編集できます。たとえば、OAuth 2.0 クライアント ID の場合は、Google Cloud コンソールに表示される名前を編集したり、クライアント シークレットをリセットしたりできます。サービス アカウントの場合は、名前と説明を編集できます。
Google Cloud コンソールで、メニュー menu
> [その他のプロダクト] > [Google Workspace] > [認証情報] をクリックします。
Google Workspace に移動
認証情報を編集するには、編集アイコン edit をクリックします。
変更を加え、[保存] をクリックします。
クライアント シークレットをリセット
クライアント シークレットは、アプリケーションと認可サーバーのみが知っている必要があります。
Google Cloud コンソールで、メニュー menu
> [その他のプロダクト] > [Google Workspace] > [認証情報] をクリックします。
Google Workspace に移動
OAuth 2.0 クライアント ID の横にある編集アイコン edit をクリックします。
[シークレットをリセット] をクリックします。
シークレットをコピーし、この値でアプリケーションを更新します。
サービス アカウントを無効にする
サービス アカウントをオフにすると、アプリケーションはそのサービス アカウントを使用して Google Cloud リソースにアクセスできなくなります。サービス アカウントをオフにした場合でも、後でオンに戻すことができます。
Google Cloud コンソールで、メニュー menu
> [その他のプロダクト] > [Google Workspace] > [認証情報] をクリックします。
Google Workspace に移動
サービス アカウントの横にある編集アイコン edit をクリックします。
[サービス アカウントを無効にする]、[無効にする] の順にクリックします。
クライアント ID またはサービス アカウントを削除する
クライアント ID またはサービス アカウントを削除すると、アプリケーションはそのクライアント ID またはサービス アカウントを使用して Google Cloud リソースにアクセスできなくなります。クライアント ID またはサービス アカウントを削除すると、この削除は永続的なものとなり、認証情報は復元できません。
Google Cloud コンソールで、メニュー menu
> [その他のプロダクト] > [Google Workspace] > [認証情報] をクリックします。
Google Workspace に移動
認証情報の横にある削除アイコン delete をクリックし、[削除] をクリックします。
次のステップ
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-04-08 UTC。
[null,null,["最終更新日 2025-04-08 UTC。"],[[["\u003cp\u003eGoogle Workspace credentials, including OAuth 2.0 and service accounts, are used to obtain access tokens for your app to interact with Google Workspace APIs.\u003c/p\u003e\n"],["\u003cp\u003eYou can manage your Google Workspace credentials—view, edit, reset client secrets, turn off service accounts, and delete credentials—in the Google Cloud console.\u003c/p\u003e\n"],["\u003cp\u003eDeleting credentials permanently removes application access to Google Cloud resources through that credential and cannot be undone.\u003c/p\u003e\n"],["\u003cp\u003eFor security, the client secret of an OAuth 2.0 Client ID should only be known by the application and the authorization server.\u003c/p\u003e\n"]]],["Credentials, like OAuth 2.0 and service accounts, enable apps to access Google Workspace APIs. To manage them, navigate to **Google Workspace** \u003e **Credentials** in the Google Cloud console. Here, you can view credentials for all or individual APIs. Editing allows changes to names and descriptions or resetting client secrets. Service accounts can be disabled or deleted, permanently revoking app access. Similarly, deleting client IDs is permanent. Finally, credentials can be reset to get new access tokes.\n"],null,["# Manage credentials for Google Workspace APIs\n\nCredentials are used to obtain an access token from Google's authorization\nservers so your app can call Google Workspace APIs. For\nGoogle Workspace APIs, you can manage OAuth 2.0 and service account\ncredentials.\n\nView credentials\n----------------\n\nTo see a list of credentials enabled for all Google Workspace APIs or an\nindividual Google Workspace API, do the following:\n\n1. In the Google Cloud console, click Menu\n menu\n \\\u003e **More products**\n \\\u003e **Google Workspace**\n \\\u003e **Credentials**.\n\n [Go to Google Workspace](https://console.cloud.google.com/workspace-api)\n2. To select an individual Google Workspace API, click **All Google\n Workspace APIs**, then select an API.\n\nEdit credentials\n----------------\n\nAfter you create credentials, you can edit some aspects of a credential. For\nexample, for OAuth 2.0 client IDs, you can edit the name that is shown in\ntheGoogle Cloud console or reset the client secret. For service accounts, you\ncan edit the name and description.\n\n1. In the Google Cloud console, click Menu\n menu\n \\\u003e **More products**\n \\\u003e **Google Workspace**\n \\\u003e **Credentials**.\n\n [Go to Google Workspace](https://console.cloud.google.com/workspace-api)\n2. To edit a credential, click Edit edit.\n\n3. Make your changes and then click **Save**.\n\nReset client secret\n-------------------\n\nThe client secret should only be known to the application and the authorization\nserver.\n\n1. In the Google Cloud console, click Menu\n menu\n \\\u003e **More products**\n \\\u003e **Google Workspace**\n \\\u003e **Credentials**.\n\n [Go to Google Workspace](https://console.cloud.google.com/workspace-api)\n2. Next to an OAuth 2.0 Client ID, click Edit edit.\n\n3. Click **Reset Secret**.\n\n4. Copy the secret and update the application with this value.\n\nTurn off a service account\n--------------------------\n\nWhen you turn off a service account, applications no longer have access to the\nGoogle Cloud resources through that service account. If you turn off a service\naccount, you can turn it back on later.\n\n1. In the Google Cloud console, click Menu\n menu\n \\\u003e **More products**\n \\\u003e **Google Workspace**\n \\\u003e **Credentials**.\n\n [Go to Google Workspace](https://console.cloud.google.com/workspace-api)\n2. Next to a service account, click Edit edit.\n\n3. Click **Disable service account** and then click **Disable.**\n\nDelete a client ID or service account\n-------------------------------------\n\nWhen you delete a client ID or a service account, applications no longer have\naccess to the Google Cloud Resources through that client ID or service\naccount. If you delete a client ID or service account, this deletion is\npermanent and the credentials can't be restored.\n\n1. In the Google Cloud console, click Menu\n menu\n \\\u003e **More products**\n \\\u003e **Google Workspace**\n \\\u003e **Credentials**.\n\n [Go to Google Workspace](https://console.cloud.google.com/workspace-api)\n2. Next to a credential, click Delete\n delete and then click **Delete**.\n\nNext steps\n----------\n\n- [Learn about authentication \\& authorization](/workspace/guides/auth-overview).\n- [Create access credentials](/workspace/guides/create-credentials)."]]