> ## 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.revokeAllTokens()

> Revoke all project tokens.

Revoke every unexpired token for this project and return the count. Tokens covering other projects are revoked in full. Requires an API key or signed-in user.

## Signature

Method signature on `client.projects`:

```ts theme={null}
revokeAllTokens(args: {
  projectId: string;
}): Promise<RevokedScopedTokens>;
```

## Parameters

**projectId** `string` *required*

Project ID with prefix `pp.`.

## Returns

`Promise<RevokedScopedTokens>`

**revokedCount** `number` *required*

How many live tokens were revoked.

## Errors

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

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

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

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

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

const revocation = await client.projects.revokeAllTokens({
  projectId: "pp.019a0000-0000-7000-8000-000000000001"
});
console.log(revocation);
```

```json revokeAllTokens() theme={null}
{
  "revokedCount": 0
}
```


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