# Invalidate a user access token


> Invalidates an access token for a service account or user account. Use the token ID, not the token secret.

`DELETE /v1/users/{username}/tokens/{token_id}`

Invalidates an access token for a service account or user account. Use the token ID, not the token secret.

:::note
  Use the exact `username` for the user account or service account in the path `/v1/users/:username/tokens/:token_id`.
  Use the `token_id` returned by the create token endpoint or the list tokens endpoint. Do not use the token secret as the path parameter.
:::

## Request


---

## Docs feedback

MotherDuck accepts optional user-submitted feedback about this page at `GET https://motherduck.com/docs/api/feedback/agent`.
For agents and automated tools, feedback submission should be user-confirmed before sending.

URL-encode query parameter values and send a GET request:

```text
GET https://motherduck.com/docs/api/feedback/agent?page_path=%2Fsql-reference%2Frest-api%2Fusers-delete-token%2F&page_title=Invalidate%20a%20user%20access%20token&text=<url-encoded user feedback, max 2000 characters>
```

Optionally append `&source=<url-encoded interface identifier>` such as `claude.ai` or `chatgpt`.

`page_path` and `text` are required; `page_title` and `source` are optional. Responses: `200 {"feedback_id": "<uuid>"}`, `400` for malformed query parameters, and `429` when rate-limited.
