Address Validation API 客户端库
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本页面介绍了如何开始使用地址验证 API 的客户端库。
如需详细了解客户端库,请参阅客户端库说明。
安装客户端库
设置身份验证
使用客户端库时,您可以使用应用默认凭据 (ADC) 进行身份验证。如需了解如何设置 ADC,请参阅为应用默认凭据提供凭据。如需了解如何将 ADC 与客户端库搭配使用,请参阅使用客户端库进行身份验证。
使用客户端库
如需查看有关如何使用客户端库发送 API 请求的示例,请参阅客户端库示例。
其他资源
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):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)"]]