Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
API Google Drive cho phép bạn tạo các ứng dụng sử dụng bộ nhớ đám mây của Google Drive.
Bạn có thể phát triển các ứng dụng tích hợp với Drive và tạo chức năng mạnh mẽ trong ứng dụng của mình bằng Drive API.
Sơ đồ này cho thấy mối quan hệ giữa ứng dụng Drive, Drive API và Drive:
Hình 1. Sơ đồ mối quan hệ của Google Drive.
Các thuật ngữ này xác định các thành phần chính xuất hiện trong Hình 1:
Google Drive
Dịch vụ lưu trữ tệp trên đám mây của Google cung cấp cho người dùng một không gian lưu trữ cá nhân, được gọi là Drive của tôi, và lựa chọn truy cập vào các thư mục dùng chung để cộng tác, được gọi là ổ đĩa dùng chung.
Google Drive API
API REST cho phép bạn sử dụng bộ nhớ Drive ngay trong ứng dụng của mình.
Ứng dụng Google Drive
Một ứng dụng sử dụng Drive làm giải pháp lưu trữ.
Giao diện người dùng của Google Drive
Giao diện người dùng của Google giúp quản lý các tệp được lưu trữ trên Drive. Nếu ứng dụng của bạn là ứng dụng thuộc loại trình chỉnh sửa (chẳng hạn như bảng tính hoặc trình xử lý văn bản), bạn có thể tích hợp với giao diện người dùng Drive để tạo và mở tệp trong ứng dụng của mình.
Drive của tôi
Vị trí lưu trữ trên Drive mà một người dùng cụ thể sở hữu. Bạn có thể chia sẻ các tệp được lưu trữ trên Drive của tôi với những người dùng khác, nhưng quyền sở hữu nội dung vẫn thuộc về một người dùng cụ thể.
OAuth 2.0
Giao thức uỷ quyền mà Drive API yêu cầu để xác thực người dùng ứng dụng của bạn. Nếu ứng dụng của bạn sử dụng tính năng Đăng nhập bằng Google, thì ứng dụng sẽ xử lý quy trình OAuth 2.0 và mã truy cập ứng dụng.
Bộ nhớ dùng chung
Một vị trí lưu trữ trên Drive có các tệp mà nhiều người dùng cùng cộng tác. Bất kỳ người dùng nào có quyền truy cập vào bộ nhớ dùng chung đều có quyền truy cập vào tất cả tệp trong bộ nhớ đó. Người dùng cũng có thể được cấp quyền truy cập vào các tệp riêng lẻ trong bộ nhớ dùng chung.
Kết hợp với Google Picker API để tìm kiếm tất cả các tệp trong Drive, sau đó trả về tên tệp, URL, ngày sửa đổi gần đây nhất và người dùng.
Tạo lối tắt của bên thứ ba là các đường liên kết bên ngoài đến dữ liệu được lưu trữ bên ngoài Drive, trong một kho dữ liệu hoặc hệ thống lưu trữ đám mây khác.
Tạo một thư mục riêng trên Drive để lưu trữ dữ liệu dành riêng cho ứng dụng để ứng dụng không thể truy cập vào tất cả nội dung của người dùng được lưu trữ trên Drive.
Tích hợp ứng dụng có hỗ trợ Drive với giao diện người dùng Drive bằng giao diện người dùng Google Drive. Đây là giao diện người dùng web tiêu chuẩn của Google mà bạn có thể dùng để tạo, sắp xếp, khám phá và chia sẻ tệp trên Drive.
Áp dụng nhãn cho tệp trên Drive, đặt giá trị trường nhãn, đọc giá trị trường nhãn trên tệp và tìm kiếm tệp bằng cách sử dụng các thuật ngữ siêu dữ liệu nhãn do hệ thống phân loại nhãn tuỳ chỉnh xác định.
Bạn muốn xem API Google Drive hoạt động như thế nào?
Kênh Google Workspace Developers cung cấp các video về mẹo, thủ thuật và các tính năng mới nhất.
Để tìm hiểu về cách phát triển bằng các API của Google Workspace, bao gồm cả việc xử lý hoạt động xác thực và uỷ quyền, hãy xem phần Phát triển trên Google Workspace.
Để tìm hiểu cách định cấu hình và chạy một ứng dụng Drive API, hãy đọc phần Hướng dẫn nhanh.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-04 UTC."],[],[],null,["# Google Drive API overview\n\nThe Google Drive API lets you create apps that use Google Drive cloud storage.\nYou can develop applications that integrate with Drive, and\ncreate robust functionality in your application using the Drive API.\n\nThis diagram shows the relationship between your Drive app, the\nDrive API, and Drive:\n**Figure 1.** Google Drive relationship diagram.\n\nThese terms define the key components shown in Figure 1:\n\n*Google Drive*\n: Google's cloud file storage service provides users with a\n personal storage space, called *My Drive* , and the option to\n access collaborative shared folders, called *shared drives*.\n\n*Google Drive API*\n: The REST API that lets you use Drive storage\n from within your app.\n\n*Google Drive app*\n: An app that uses Drive as its storage solution.\n\n*Google Drive UI*\n: Google's user interface that manages files stored on\n Drive. If your app is an editor-type app, such as a\n spreadsheet or word processor, you can integrate with the\n Drive UI to create and open files within your app.\n\n*My Drive*\n: A Drive storage location that a\n specific user owns. Files stored on My Drive can be shared\n with other users, but ownership of the content remains specific to an\n individual user.\n\n*OAuth 2.0*\n: The authorization protocol that Drive API requires to\n authenticate your app users. If your application uses [Sign In With\n Google](/identity/gsi/web/guides/overview), it handles the OAuth 2.0 flow\n and application access tokens.\n\n*Shared drive*\n: A Drive storage location that owns files that multiple users\n collaborate on. Any user with access to a shared drive has access to all\n files it contains. Users can also be granted access to individual\n files inside the shared drive.\n\nWhat can you do with the Drive API?\n-----------------------------------\n\nYou can use the Drive API to:\n\n- [Download files](/workspace/drive/api/guides/manage-downloads) from Drive and [upload files](/workspace/drive/api/guides/manage-uploads) to Drive.\n- [Search for files and folders](/workspace/drive/api/guides/search-files) stored in Drive. Create complex search queries that return any of the file metadata fields in the [`files`](/workspace/drive/api/reference/rest/v3/files) resource.\n- Let users [share files, folders, and drives](/workspace/drive/api/guides/manage-sharing) to collaborate on content.\n- Combine with the [Google Picker API](https://developers.google.com/picker/docs/) to search all files in Drive, then return the filename, URL, last modified date, and user.\n- [Create *third-party shortcuts*](/workspace/drive/api/guides/third-party-shortcuts) that are external links to data stored outside of Drive, in a different datastore or cloud storage system.\n- Create a dedicated Drive folder to [store\n application-specific data](/workspace/drive/api/guides/appdata) so the app cannot access all the user's content stored in Drive.\n- Monitor or respond to file activity using [Google Drive\n events](/workspace/events/guides/events-drive).\n- Integrate your Drive-enabled app with the [Drive UI](/workspace/drive/api/guides/about-apps) using the *Google Drive UI*. It's Google's standard web UI that you can use to create, organize, discover, and share Drive files.\n- Apply [labels](/workspace/drive/api/guides/about-labels) to Drive files, set label field values, read label field values on files, and search for files using label metadata terms defined by the custom label taxonomy.\n\n|---|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | Want to see the Google Drive API in action? The Google Workspace Developers channel offers videos about tips, tricks, and the latest features. [Subscribe now](https://www.youtube.com/channel/UCUcg6az6etU_gRtZVAhBXaw) |\n\nRelated topics\n--------------\n\n- To learn about developing with Google Workspace APIs, including handling\n authentication and authorization, see [Develop on\n Google Workspace](/workspace/guides/getstarted-overview).\n\n- To learn how to configure and run a Drive API app, read the\n [Quickstarts](/workspace/drive/api/quickstart/js)."]]