Method: projects.getAuthorization
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
HTTP 请求
GET https://gsuiteaddons.googleapis.com/v1/{name=projects/*/authorization}
网址采用 gRPC 转码语法。
路径参数
参数 |
name |
string
必需。要获取 Google Workspace 插件授权信息的项目的名称。 示例:projects/my_project/authorization 。
必须对指定的资源 name 具有以下 IAM 权限才能进行授权:
gsuiteaddons.authorizations.get
|
响应正文
调用部署端点时使用的授权信息。
如果成功,响应正文将包含结构如下的数据:
JSON 表示法 |
{
"name": string,
"serviceAccountEmail": string,
"oauthClientId": string
} |
字段 |
name |
string
此资源的规范全称。示例:projects/123/authorization
|
serviceAccountEmail |
string
用于对向插件回调端点发出的请求进行身份验证的服务账号的电子邮件地址。
|
oauthClientId |
string
用于代表插件为用户获取 OAuth 访问令牌的 OAuth 客户端 ID。
|
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/cloud-platform
如需了解详情,请参阅授权指南。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-04-22。
[null,null,["最后更新时间 (UTC):2025-04-22。"],[[["\u003cp\u003eRetrieves Google Workspace Add-on authorization details for a specific project.\u003c/p\u003e\n"],["\u003cp\u003eRequires project name as a path parameter and an empty request body.\u003c/p\u003e\n"],["\u003cp\u003eResponse includes authorization name, service account email, and OAuth client ID.\u003c/p\u003e\n"],["\u003cp\u003eNeeds \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scope for authorization.\u003c/p\u003e\n"]]],["This document details retrieving authorization information for Google Workspace add-on deployments within a project. It uses a `GET` HTTP request to a specific URL containing the project name. The request body must be empty. The response, formatted in JSON, includes the project's canonical name, service account email, and OAuth client ID. Authorization requires a `gsuiteaddons.authorizations.get` IAM permission and the `https://www.googleapis.com/auth/cloud-platform` OAuth scope.\n"],null,["# Method: projects.getAuthorization\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.Authorization.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nGets the authorization information for deployments in a given project.\n\n### HTTP request\n\n`GET https://gsuiteaddons.googleapis.com/v1/{name=projects/*/authorization}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Required. Name of the project for which to get the Google Workspace add-on authorization information. Example: `projects/my_project/authorization`. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `name`: - `gsuiteaddons.authorizations.get` |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nThe authorization information used when invoking deployment endpoints.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"serviceAccountEmail\": string, \"oauthClientId\": string } ``` |\n\n| Fields ||\n|-----------------------|---------------------------------------------------------------------------------------------------------------|\n| `name` | `string` The canonical full name of this resource. Example: `projects/123/authorization` |\n| `serviceAccountEmail` | `string` The email address of the service account used to authenticate requests to add-on callback endpoints. |\n| `oauthClientId` | `string` The OAuth client ID used to obtain OAuth access tokens for a user on the add-on's behalf. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]