Google Drive API のスコープ
Drive API スコープ
アプリに付与されるアクセスレベルを定義するには、認可スコープを特定して宣言する必要があります。認可スコープは、Google Workspace アプリ名、アクセスするデータの種類、アクセスレベルを含む OAuth 2.0 URI 文字列です。スコープとは、アプリが Google Workspace データ(ユーザーの Google アカウント データなど)を操作するためのリクエストです。
アプリがインストールされると、アプリで使用されるスコープをユーザーが検証するよう求められます。通常は、できるだけ範囲の狭いスコープを選択し、アプリで必要のないスコープはリクエストしないようにします。ユーザーは、明確に記述された制限付きのスコープへのアクセス権を簡単に付与できます。
可能であれば、機密性のないスコープを使用することをおすすめします。ファイルごとのアクセススコープが付与され、アプリに必要な特定の機能へのアクセスが制限されるためです。
上の表の「使用量」列は、次の定義に従って各スコープの機密性を示しています。
-
推奨 / 機密性なし: これらのスコープは、承認アクセスの最小スコープを提供し、基本的なアプリの確認のみを必要とします。この要件については、適格性確認の要件をご覧ください。
-
推奨 / 機密: これらのスコープは、アプリについてユーザーによって承認された特定の Google ユーザーデータへのアクセスを提供します。追加のアプリ検証を行う必要があります。この要件については、機密性の高いスコープと制限付きスコープの要件をご覧ください。
-
制限付き: これらのスコープは Google ユーザーデータへの幅広いアクセスを提供します。制限付きスコープの検証プロセスを実行する必要があります。この要件については、Google API サービスのユーザーデータ ポリシーと特定の API スコープに関する追加要件をご覧ください。制限付きのスコープのデータをサーバーに保存する(または転送する)場合は、セキュリティ評価を受ける必要があります。
アプリが他の Google API へのアクセスを必要とする場合は、それらのスコープも追加できます。Google API スコープの詳細については、OAuth 2.0 を使用した Google API へのアクセスをご覧ください。
特定の OAuth 2.0 スコープの詳細については、Google API の OAuth 2.0 スコープをご覧ください。
Google Drive API
サービス エンドポイント
サービス エンドポイントは、API サービスのネットワーク アドレスを指定するベース URL です。1 つのサービスに複数のサービス エンドポイントが存在することがあります。このサービスには次のサービス エンドポイントがあり、以下のすべての URI がこのサービス エンドポイントに関連しています。
REST リソース: v3.about
| Methods | HTTP メソッドとエンドポイント / 説明 | 認可スコープ |
|---|---|---|
| get |
GET /drive/v3/aboutユーザーのドライブ、システム機能に関する情報を取得します。 |
https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/drive.appdata https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/drive.metadata https://www.googleapis.com/auth/drive.metadata.readonly https://www.googleapis.com/auth/drive.photos.readonly https://www.googleapis.com/auth/drive.readonly |
REST リソース: v3.apps
| Methods | HTTP メソッドとエンドポイント / 説明 | 認可スコープ |
|---|---|---|
| get |
GET /drive/v3/apps/{appId}特定のアプリを取得します。 |
https://www.googleapis.com/auth/docs https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/drive.appdata https://www.googleapis.com/auth/drive.apps.readonly https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/drive.metadata https://www.googleapis.com/auth/drive.metadata.readonly https://www.googleapis.com/auth/drive.readonly |
| list |
GET /drive/v3/appsユーザーがインストールしたアプリを一覧表示します。 |
https://www.googleapis.com/auth/drive.apps.readonly |
REST リソース: v3.accessproposals
| Methods | HTTP メソッドとエンドポイント / 説明 | 認可スコープ |
|---|---|---|
| get |
GET /drive/v3/files/{fileId}/accessproposals/{proposalId}ID で AccessProposal を取得します。 |
|
| list |
GET /drive/v3/files/{fileId}/accessproposalsファイルの AccessProposals を一覧表示します。 |
https://www.googleapis.com/auth/docs https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/drive.metadata https://www.googleapis.com/auth/drive.metadata.readonly https://www.googleapis.com/auth/drive.readonly |
| resolve |
POST /drive/v3/files/{fileId}/accessproposals/{proposalId}:resolveアクセス提案を承認または拒否するために使用します。 |
https://www.googleapis.com/auth/docs https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/drive.file |
REST リソース: v3.changes
REST リソース: v3.channels
REST リソース: v3.comments
| Methods | HTTP メソッドとエンドポイント / 説明 | 認可スコープ |
|---|---|---|
| create |
POST /drive/v3/files/{fileId}/comments ファイルにコメントを作成します。 |
https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/drive.file |
| delete |
DELETE /drive/v3/files/{fileId}/comments/{commentId} コメントを削除します。 |
https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/drive.file |
| get |
GET /drive/v3/files/{fileId}/comments/{commentId} ID でコメントを取得します。 |
https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/drive.meet.readonly https://www.googleapis.com/auth/drive.readonly |
| list |
GET /drive/v3/files/{fileId}/comments ファイルのコメントを一覧表示します。 |
https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/drive.meet.readonly https://www.googleapis.com/auth/drive.readonly |
| update |
PATCH /drive/v3/files/{fileId}/comments/{commentId} パッチのセマンティクスを含むコメントを更新します。 |
https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/drive.file |
REST リソース: v3.drives
| Methods | HTTP メソッドとエンドポイント / 説明 | 認可スコープ |
|---|---|---|
| create |
POST /drive/v3/drives共有ドライブを作成します。 |
https://www.googleapis.com/auth/drive |
| delete |
DELETE /drive/v3/drives/{driveId}ユーザーがorganizerの共有ドライブを完全に削除します。 |
https://www.googleapis.com/auth/drive |
| get |
GET /drive/v3/drives/{driveId}共有ドライブのメタデータをIDで取得します。 |
https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/drive.readonly |
| hide |
POST /drive/v3/drives/{driveId}/hide共有ドライブをデフォルトビューで非表示にします。 |
https://www.googleapis.com/auth/drive |
| list |
GET /drive/v3/drivesユーザーの共有ドライブを一覧表示します。 |
https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/drive.readonly |
| unhide |
POST /drive/v3/drives/{driveId}/unhide共有ドライブをデフォルトのビューに復元します。 |
https://www.googleapis.com/auth/drive |
| update |
PATCH /drive/v3/drives/{driveId}共有ドライブのメタデータを更新します。 |
https://www.googleapis.com/auth/drive |