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。
|
方法 |
|
删除用户为应用签发的所有访问令牌。 |
|
获取用户发出的访问令牌的相关信息。 |
|
返回指定用户向第三方应用签发的一组令牌。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):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. |"]]