Thư viện ứng dụng cho các dịch vụ tác vụ theo lịch
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.
Để có trải nghiệm tốt hơn so với việc phát triển trên REST thô hoặc gRPC để giao tiếp giữa các máy chủ, hãy sử dụng các thư viện ứng dụng dành riêng cho ngôn ngữ của Google.
Tải các tệp protobuf mà những ứng dụng này dựa vào bằng cách truy cập vào kho lưu trữ GitHub.
Nếu không có thư viện bằng ngôn ngữ của ứng dụng, hãy sử dụng gRPC hoặc các điểm cuối Fleet Engine REST.
LƯU Ý: Các Thư viện ứng dụng Google Cloud được thiết kế để chạy trong môi trường máy chủ đáng tin cậy. Không cần JWT. Sử dụng Thông tin xác thực mặc định của ứng dụng cùng với vai trò deliveryAdmin thích hợp.
Xem các ví dụ về Java để tương tác với Fleet Engine API trên trang Lấy xe giao hàng.
Thư viện xác thực Fleet Engine
Bạn có thể sử dụng Thư viện xác thực Fleet Engine để tạo mã thông báo web JSON đã ký trong môi trường Java. Fleet Engine sử dụng JWT để hạn chế quyền truy cập vào các API Fleet Engine trong môi trường không đáng tin cậy. Thư viện xác thực Fleet Engine giúp đơn giản hoá việc tạo JWT Fleet Engine bằng Java và ký chúng một cách an toàn. Để biết thông tin chi tiết, hãy xem Thư viện xác thực Fleet Engine cho Java.
Thư viện này mang lại những lợi ích sau:
Đơn giản hoá quy trình tạo mã thông báo Fleet Engine.
Cung cấp các cơ chế ký mã thông báo ngoài việc sử dụng tệp thông tin đăng nhập (chẳng hạn như mạo danh tài khoản dịch vụ).
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-09-05 UTC."],[[["\u003cp\u003eLeverage Google's language-specific client libraries for streamlined server-to-server communication with Fleet Engine, instead of using raw REST or gRPC.\u003c/p\u003e\n"],["\u003cp\u003eAccess protobuf files underpinning these clients from the designated GitHub repository for development purposes.\u003c/p\u003e\n"],["\u003cp\u003eUtilize gRPC or Fleet Engine REST endpoints if client libraries are unavailable for your programming language.\u003c/p\u003e\n"],["\u003cp\u003eFor Java development, integrate the \u003ccode\u003ecom.google.maps:google-maps-fleetengine-delivery\u003c/code\u003e library via Maven or Gradle, and utilize Application Default Credentials for authentication in trusted server environments.\u003c/p\u003e\n"],["\u003cp\u003eExplore experimental client libraries for Node.js/TypeScript, Go, Python, C#, PHP, and Ruby, offering varying levels of functionality and support.\u003c/p\u003e\n"]]],[],null,["# Client libraries for scheduled task services\n\nFor a better experience than developing over raw REST or gRPC for\nserver-to-server communication, use Google's language-specific client libraries.\nGet the protobuf files these clients are based on by visiting the [GitHub](https://github.com/googleapis/googleapis/tree/master/google/maps/fleetengine/delivery/v1)\nrepository.\n\nIf libraries don't exist in your application's language, use gRPC or the\n[Fleet Engine REST](/maps/documentation/mobility/fleet-engine/reference/tasks/rest) endpoints.\n\nNOTE: Google Cloud Client Libraries are intended to run in trusted server\nenvironments. JWTs are unnecessary. Use [Application Default\nCredentials](https://cloud.google.com/docs/authentication/provide-credentials-adc)\nalong with the appropriate `deliveryAdmin` role.\n\nJava\n----\n\nJava libraries are published to public Maven repositories as\n[`com.google.maps:google-maps-fleetengine-delivery`](https://central.sonatype.com/artifact/com.google.maps/google-maps-fleetengine-delivery). \n\n### Gradle\n\n dependencies {\n implementation 'com.google.maps:google-maps-fleetengine-delivery:latest.release'\n }\n\n### Maven\n\n \u003cproject\u003e\n \u003cdependency\u003e\n \u003cgroupId\u003ecom.google.maps\u003c/groupId\u003e\n \u003cartifactId\u003egoogle-maps-fleetengine-delivery\u003c/artifactId\u003e\n \u003cversion\u003eLATEST\u003c/version\u003e\n \u003c/dependency\u003e\n \u003c/project\u003e\n\nSee Java examples for interacting with the Fleet Engine API on the\n[Get a delivery vehicle](/maps/documentation/mobility/fleet-engine/essentials/vehicles/scheduled-tasks-get-vehicle) page.\n\n### Fleet Engine Authentication Library\n\nYou can use the Fleet Engine Authentication Library to create signed JSON web\ntokens in the Java environment. Fleet Engine uses JWTs to restrict access to\nFleet Engine APIs in untrusted environments. The Fleet Engine Authentication\nLibrary simplifies construction of Fleet Engine JWTs in Java and securely signs\nthem. For details, see [Fleet Engine Authentication Library for Java](https://github.com/googlemaps/java-fleetengine-auth).\n\nThe library provides the following benefits:\n\n- Simplifies the process of creating Fleet Engine Tokens.\n- Provides token signing mechanisms other than using credential files (such as impersonating a service account.)\n\n| **Important:** Google highly recommends using the Fleet Engine Authentication Library with all Java implementations.\n\nNode.js / TypeScript\n--------------------\n\n| Experimental Library\n\nSee \u003chttps://www.npmjs.com/package/@googlemaps/fleetengine-delivery\u003e \n\n### npm\n\n npm install @googlemaps/fleetengine-delivery\n\nGo\n---\n\n| Experimental Library\n\nThe Go library is packaged as a module at\n\u003chttps://pkg.go.dev/cloud.google.com/go/maps\u003e\n\nPython\n------\n\n| Experimental Library\n\nSee \u003chttps://pypi.org/project/google-maps-fleetengine-delivery/0.1.0/\u003e \n\n### pip\n\n pip install google-auth\n pip install google-maps-fleetengine-delivery\n\nC#\n---\n\n| Experimental Library\n\nInstallation instructions for the C# library can be found at\n\u003chttps://www.nuget.org/packages/Google.Maps.FleetEngine.Delivery.V1\u003e.\n\nPHP\n---\n\n| Experimental Library\n\nSee \u003chttps://packagist.org/packages/google/maps-fleetengine-delivery\u003e.\n\nRuby\n----\n\n| Experimental Library\n\nSee \u003chttps://rubygems.org/gems/google-maps-fleet_engine-delivery\u003e."]]