授权概览
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本文档简要介绍了身份验证、授权和计费是如何完成的。
对于所有 API 调用,您的应用都需要进行身份验证。当 API 访问用户的私有数据时,您的应用还必须获得用户的授权才能访问该数据。例如,访问公开的 Google+ 信息不需要用户授权,但访问用户的私人日历需要授权。此外,出于配额和结算目的,所有 API 调用都涉及核算。本文档总结了 Google API 使用的协议,并提供了更多信息的链接。
访问权限类型
如需了解详情,请参阅“使用入门”页面的身份验证和授权部分。
使用 API 密钥
如需查看 API 密钥的更多信息和示例,请参阅 API 密钥页面。
使用 OAuth 2.0
如需了解 OAuth 2.0 的更多信息和示例,请参阅 OAuth 2.0 页面。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[[["\u003cp\u003eGoogle APIs require authentication for all calls and authorization when accessing private user data.\u003c/p\u003e\n"],["\u003cp\u003eAPI usage is tracked for accounting, quota, and billing purposes.\u003c/p\u003e\n"],["\u003cp\u003eGoogle APIs utilize API keys and OAuth 2.0 for authentication and authorization.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can find more information about authentication, authorization, and API keys through provided links.\u003c/p\u003e\n"]]],[],null,["# Authorization Overview\n\nThis document is an overview of how authentication, authorization,\nand accounting are accomplished.\nFor all API calls, your application needs to be authenticated.\nWhen an API accesses a user's private data, your application\nmust also be authorized by the user to access the data.\nFor example, accessing a public Google+ post would not require user authorization,\nbut accessing a user's private calendar would.\nAlso, for quota and billing purposes, all API calls involve accounting.\nThis document summarizes the protocols used by Google APIs and provides links to more information.\n\nAccess types\n------------\n\nRead more in the [Authentication and authorization](/api-client-library/dotnet/get_started#auth) section in the Get Started page.\n\nUsing API keys\n--------------\n\n\nMore information and examples for API keys are provided on the\n[API Keys](/api-client-library/dotnet/guide/aaa_apikeys)\npage.\n\nUsing OAuth 2.0\n---------------\n\n\nMore information and examples for OAuth 2.0 are provided on the\n[OAuth 2.0](/api-client-library/dotnet/guide/aaa_oauth)\npage."]]