Drive API v3 への移行
現在 Drive API v2 を使用している場合は、v3 に移行できます。
バージョン間のすべてのリソースの違いについては、V2 から v3 へのリファレンスをご覧ください。
{drive_api_short} のバージョンは、言語ごとに異なります。
var DISCOVERY_DOCS = ["https://www.googleapis.com/discovery/v1/apis/drive/v3/rest"];
service = build('drive', 'v3', credentials=creds)
- Node.js の場合、google.drive コンストラクタを設定するときにバージョンを定義します。例については、Node.js クイックスタートをご覧ください。
const drive = google.drive({version: 'v3', auth});
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-02-24 UTC。
[null,null,["最終更新日 2025-02-24 UTC。"],[[["Drive API users can migrate from v2 to v3 using the provided reference guide."],["The v3 implementation varies by language, with Java requiring a library download, JavaScript needing a Discovery docs URL, Python specifying during service object creation, and Node.js setting it in the google.drive constructor."]]],["Drive API v2 users can migrate to v3, consulting the provided reference for resource differences. Version specification varies by language: Java users download the v3 library; JavaScript users define the version via a Discovery docs URL. Python developers specify the version when building the service object, and Node.js developers define the version during the `google.drive` constructor. Each language has a quickstart for an example on the implementation.\n"]]