Address Validation API 用戶端程式庫
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
本頁說明如何開始使用 Address Validation API 適用的用戶端程式庫。
如要進一步瞭解用戶端程式庫,請參閱「用戶端程式庫說明」。
安裝用戶端程式庫
設定驗證方法
使用用戶端程式庫時,您會使用應用程式預設憑證 (ADC) 進行驗證。如要瞭解如何設定 ADC,請參閱「提供應用程式預設憑證的憑證」。如要瞭解如何搭配使用 ADC 與用戶端程式庫,請參閱「使用用戶端程式庫進行驗證」。
使用用戶端程式庫
如要瞭解如何使用用戶端程式庫傳送 API 要求,請參閱用戶端程式庫範例。
其他資源
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-31 (世界標準時間)。
[null,null,["上次更新時間:2025-08-31 (世界標準時間)。"],[[["\u003cp\u003eThis page provides instructions for getting started with the Address Validation API client libraries, focusing on C# implementation.\u003c/p\u003e\n"],["\u003cp\u003eYou'll learn how to install the necessary C# client library using the \u003ccode\u003eInstall-Package\u003c/code\u003e command.\u003c/p\u003e\n"],["\u003cp\u003eThe guide details the authentication process using Application Default Credentials (ADC) and provides links for further setup information.\u003c/p\u003e\n"],["\u003cp\u003eIt includes a C# code snippet demonstrating how to use the client library to validate an address.\u003c/p\u003e\n"],["\u003cp\u003eLinks to additional resources like source code, issue tracker, and Stack Overflow are provided for further assistance.\u003c/p\u003e\n"]]],["To start using the Address Validation API client library in C#, install the `Google.Maps.AddressValidation.V1` package. Authenticate via Application Default Credentials (ADC). Utilize the `AddressValidationClient` to validate an address, creating a `ValidateAddressRequest` with properties like `PostalAddress`, `PreviousResponseId`, `EnableUspsCass`, and `SessionToken`. Send the request to the client and obtain a `ValidateAddressResponse`. Refer to linked resources for further assistance.\n"],null,["This page shows how to get started with the client libraries for\nAddress Validation API.\n\nRead more about the client libraries in [Client Libraries\nExplained](https://cloud.google.com/apis/docs/client-libraries-explained).\n\nInstall the client library \n\nJava\n\nFor more information, see\n[Setting Up a Java Development Environment](https://cloud.google.com/java/docs/setup)\nand [Using Cloud Client Libraries](https://cloud.google.com/java/docs/bom).\n\nFor the complete installation instructions, see [Google Address Validation API Client for Java](https://github.com/googleapis/google-cloud-java/blob/main/java-maps-addressvalidation/README.md).\n\nGo \n\n```\ngo get cloud.google.com/go/maps\n```\n\nFor more information, see\n[Setting Up a Go Development Environment](https://cloud.google.com/go/docs/setup).\n\nFor the complete installation instructions, see [Google Address Validation API Client for Go](https://github.com/googleapis/google-cloud-go/tree/main/maps/addressvalidation/apiv1).\n\nNodeJS \n\n```\nnpm install @googlemaps/addressvalidation\n```\n\nFor more information, see\n[Setting Up a Node.js Development Environment](https://cloud.google.com/nodejs/docs/setup).\n\nFor the complete installation instructions, see [Google Address Validation API Client for NodeJS](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-maps-addressvalidation).\n\nPython \n\n```\npip install google-maps-addressvalidation\n```\n\nFor more information, see\n[Setting Up a Python Development Environment](https://cloud.google.com/python/docs/setup).\n\nFor the complete installation instructions, see [Google Address Validation API Client for Python](https://github.com/googleapis/google-cloud-python/tree/main/packages/google-maps-addressvalidation).\n\n.NET \n\n```\nInstall-Package Google.Maps.AddressValidation.V1 -Pre\n```\n\nFor more information, see\n[Setting Up a C# Development Environment](https://cloud.google.com/dotnet/docs/setup)\nand\n[Google Address Validation API Client for .NET](https://github.com/googleapis/google-cloud-dotnet/tree/main/apis/Google.Maps.AddressValidation.V1).\n\nSet up authentication\n\nWhen you use client libraries, you use\n[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials)\nto authenticate. For information about setting up ADC, see\n[Provide credentials for Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc).\nFor information about using ADC with client libraries, see\n[Authenticate using client libraries](https://cloud.google.com/docs/authentication/client-libraries).\n\nUse the client library\n\nSee\n[Client library examples](https://developers.google.com/maps/documentation/address-validation/client-library-examples)\nfor examples of how to send API requests using the client libraries.\n\nAdditional resources \n\nJava\n\n- [Source Code](https://github.com/googleapis/google-cloud-java/tree/main/java-maps-addressvalidation)\n- [GitHub Issue Tracker](https://github.com/googleapis/google-cloud-java/issues)\n- [Stack Overflow](https://stackoverflow.com/questions/tagged/google-address-validation-api)\n\nGo\n\n- [Source Code](https://github.com/googleapis/google-cloud-go/tree/main/maps/addressvalidation/apiv1)\n- [Package Documentation](https://pkg.go.dev/cloud.google.com/go/maps@v1.21.0/addressvalidation/apiv1)\n- [GitHub Issue Tracker](https://github.com/googleapis/google-cloud-go/issues)\n- [Stack Overflow](https://stackoverflow.com/questions/tagged/google-address-validation-api)\n\nNodeJS\n\n- [Source Code](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-maps-addressvalidation)\n- [GitHub Issue Tracker](https://github.com/googleapis/google-cloud-node/issues)\n- [Stack Overflow](https://stackoverflow.com/questions/tagged/google-address-validation-api)\n\nPython\n\n- [Source Code](https://github.com/googleapis/google-cloud-python/tree/main/packages/google-maps-addressvalidation)\n- [GitHub Issue Tracker](https://github.com/googleapis/google-cloud-python/issues)\n- [Stack Overflow](https://stackoverflow.com/questions/tagged/google-address-validation-api)\n\n.NET\n\n- [Source Code](https://github.com/googleapis/google-cloud-dotnet/tree/main/apis/Google.Maps.AddressValidation.V1)\n- [GitHub Issue Tracker](https://github.com/googleapis/google-cloud-dotnet/issues)\n- [Stack Overflow](https://stackoverflow.com/questions/tagged/google-address-validation-api)"]]