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
詳情請參閱授權指南。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-04-22 (世界標準時間)。
[null,null,["上次更新時間: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)."]]