> ## Documentation Index
> Fetch the complete documentation index at: https://docs.platform.toloka.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# client.projects.revokeToken()

> Revoke a project-scoped token.

Revoke the specified token and return 204. It stops working immediately. Requires an API key or signed-in user.

## Signature

Method signature on `client.projects`:

```ts theme={null}
revokeToken(args: {
  projectId: string;
  tokenId: string;
}): Promise<void>;
```

## Parameters

**projectId** `string` *required*

Project ID with prefix `pp.`.

**tokenId** `string` *required*

ID of the scoped token, with prefix `pst.`.

## Returns

`Promise<void>`

Resolves without a return value.

## Errors

HTTP errors throw [`PotatoApiError`](https://docs.platform.toloka.ai/docs/sdk/errors). The endpoint documents these error responses:

| Status | Description |
| - | - |
| 404 | Project or live token not found |
| 429 | Rate limit exceeded |

HTTP endpoint: [`DELETE /projects/{projectId}/tokens/{tokenId}`](https://docs.platform.toloka.ai/docs/api-reference/projects/revoke-project-token).

```ts revokeToken() theme={null}
import { createClient } from "@toloka-platform/sdk";

const client = createClient({
  baseUrl: "https://platform.toloka.ai",
  apiKey: process.env.TOLOKA_API_KEY!,
});

await client.projects.revokeToken({
  projectId: "pp.019a0000-0000-7000-8000-000000000001",
  tokenId: "pst.019a0000-0000-7000-8000-000000000001"
});
```

This method resolves without a return value.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.