[comment]: # ({c63958e0-c63958e0})
# token.delete

[comment]: # ({/c63958e0-c63958e0})

[comment]: # ({71898676-e5872416})
### 描述

`object token.delete(array tokenids)`

此方法允许delete令牌。

::: noteclassic
用户角色需要拥有*管理API令牌*的[配置](/manual/web_interface/frontend_sections/users/user_roles#配置)权限，才能管理其他用户的令牌。
:::

[comment]: # ({/71898676-e5872416})

[comment]: # ({92c0da91-92c0da91})
### 参数

`(array)` 要删除的令牌 ID。

[comment]: # ({/92c0da91-92c0da91})

[comment]: # ({fd9b032e-fd9b032e})
### 返回值

`(object)` 返回一个 object，其中包含在 `tokenids` 属性下列出的已删除令牌的 ID。

[comment]: # ({/fd9b032e-fd9b032e})

[comment]: # ({b41637d2-b41637d2})
### 示例

[comment]: # ({/b41637d2-b41637d2})

[comment]: # ({69adf3b7-7f001ef1})
#### 删除多个令牌

删除两个令牌。

[执行请求](/manual/api#执行请求):

```json
{
    "jsonrpc": "2.0",
    "method": "token.delete",
    "params": [
        "188",
        "192"
    ],
    "id": 1
}
```
响应：

```json
{
    "jsonrpc": "2.0",
    "result": {
        "tokenids": [
            "188",
            "192"
        ]
    },
    "id": 1
}
```

[comment]: # ({/69adf3b7-7f001ef1})

[comment]: # ({9ebff2e2-9ebff2e2})
### 来源

*ui/include/classes/api/services/CToken.php* 中的 CToken::delete()。

[comment]: # ({/9ebff2e2-9ebff2e2})
