REST Resource: tokens
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
資源:符記
Directory API 中權杖資源的 JSON 範本。
JSON 表示法 |
{
"clientId": string,
"scopes": [
string
],
"userKey": string,
"anonymous": boolean,
"displayText": string,
"nativeApp": boolean,
"kind": string,
"etag": string
} |
欄位 |
clientId |
string
憑證核發給的應用程式用戶端 ID。
|
scopes[] |
string
應用程式授予的授權範圍清單。
|
userKey |
string
發出權杖的使用者專屬 ID。
|
anonymous |
boolean
指出應用程式是否已向 Google 註冊。如果應用程式具有匿名用戶端 ID,這個值會是 true 。
|
displayText |
string
符記發給的應用程式可顯示名稱。
|
nativeApp |
boolean
權杖是否核發給已安裝的應用程式。如果應用程式已安裝在電腦或行動裝置上,這個值會是 true 。
|
kind |
string
API 資源的類型。這個值一律是 admin#directory#token 。
|
etag |
string
資源的 ETag。
|
方法 |
|
刪除使用者為應用程式核發的所有存取權杖。 |
|
取得使用者所發出的存取權權杖相關資訊。 |
|
傳回指定使用者向第三方應用程式核發的憑證組合。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[],[],null,["# REST Resource: tokens\n\nResource: Token\n---------------\n\nJSON template for token resource in Directory API.\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"clientId\": string, \"scopes\": [ string ], \"userKey\": string, \"anonymous\": boolean, \"displayText\": string, \"nativeApp\": boolean, \"kind\": string, \"etag\": string } ``` |\n\n| Fields ||\n|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `clientId` | `string` The Client ID of the application the token is issued to. |\n| `scopes[]` | `string` A list of authorization scopes the application is granted. |\n| `userKey` | `string` The unique ID of the user that issued the token. |\n| `anonymous` | `boolean` Whether the application is registered with Google. The value is `true` if the application has an anonymous Client ID. |\n| `displayText` | `string` The displayable name of the application the token is issued to. |\n| `nativeApp` | `boolean` Whether the token is issued to an installed application. The value is `true` if the application is installed to a desktop or mobile device. |\n| `kind` | `string` The type of the API resource. This is always `admin#directory#token`. |\n| `etag` | `string` ETag of the resource. |\n\n| Methods ------- ||\n|--------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| ### [delete](/workspace/admin/directory/reference/rest/v1/tokens/delete) | Deletes all access tokens issued by a user for an application. |\n| ### [get](/workspace/admin/directory/reference/rest/v1/tokens/get) | Gets information about an access token issued by a user. |\n| ### [list](/workspace/admin/directory/reference/rest/v1/tokens/list) | Returns the set of tokens specified user has issued to 3rd party applications. |"]]