ย้ายข้อมูลไปยัง 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)
const drive = google.drive({version: 'v3', auth});
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-29 UTC
[null,null,["อัปเดตล่าสุด 2025-08-29 UTC"],[],[],null,["# Migrate to Drive API v3\n\nIf you are currently using Drive API v2, you can migrate to v3.\n\nYou should review the [V2 to v3 reference](/workspace/drive/api/guides/v2-to-v3-reference) for a complete map of all resource differences between versions.\n\nThe {drive_api_short} version is set differently for each language:\n\n- For Java, you download the v3 library. See [Drive API client library for Java](https://github.com/googleapis/google-api-java-client-services/tree/main/clients/google-api-services-drive/v3).\n For an example, see [Java Quickstart](/workspace/drive/api/quickstart/java).\n\n- For JavaScript, you define the version with the Discovery docs URL. For an example,\n see [Browser Quickstart](/workspace/drive/api/quickstart/js).\n\n var DISCOVERY_DOCS = [\"https://www.googleapis.com/discovery/v1/apis/drive/v3/rest\"];\n\n- For Python, you specify the version when you build the service object. For an example, see [Python Quickstart](/workspace/drive/api/quickstart/python).\n\n service = build('drive', 'v3', credentials=creds)\n\n- For Node.js, you define the version when you set the google.drive constructor. For an example, see [Node.js Quickstart](/workspace/drive/api/quickstart/nodejs).\n\n const drive = google.drive({version: 'v3', auth});"]]