## List tokens. `client.aiSearch.tokens.list(TokenListParamsparams, RequestOptionsoptions?): V4PagePaginationArray` **get** `/accounts/{account_id}/ai-search/tokens` List tokens. ### Parameters - `params: TokenListParams` - `account_id: string` Path param - `order_by?: "created_at"` Query param: Order By Column Name - `"created_at"` - `order_by_direction?: "asc" | "desc"` Query param: Order By Direction - `"asc"` - `"desc"` - `page?: number` Query param - `per_page?: number` Query param ### Returns - `TokenListResponse` - `id: string` - `cf_api_id: string` - `created_at: string` - `modified_at: string` - `name: string` - `created_by?: string | null` - `enabled?: boolean` - `legacy?: boolean` - `modified_by?: string | null` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const tokenListResponse of client.aiSearch.tokens.list({ account_id: 'c3dc5f0b34a14ff8e1b3ec04895e1b22', })) { console.log(tokenListResponse.id); } ``` #### Response ```json { "result": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "cf_api_id": "cf_api_id", "created_at": "2019-12-27T18:11:19.117Z", "modified_at": "2019-12-27T18:11:19.117Z", "name": "name", "created_by": "created_by", "enabled": true, "legacy": true, "modified_by": "modified_by" } ], "success": true } ```