# List secret agent grants

`GET /v1/projects/{project}/secrets/{secret}/agentGrants`, operation `agents.ListSecretAgentGrants`

Lists the agents that can use a secret, the most recently granted first.

Grants aren't in the secret's IAM policy, so this takes what reading its policy takes. The title of a private agent is left out.

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `project` | path | Yes | `string` | The project's ID. |
| `secret` | path | Yes | `string` | The secret's ID. |
| `pageSize` | query | No | `integer (int32)` | Maximum number of items to return. Defaults to 50; values above 500 are treated as 500. |
| `pageToken` | query | No | `string` | Page token from a previous response. |

## Responses

### 200

OK

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `grants` | `SecretAgentGrant[]` | Yes | Grants, the most recent first. |
| `nextPageToken` | `string` | Yes | Token for the next page; empty on the last page. |

### default

Error

Base URL: `https://api.kosem.ai`. See [API conventions](https://docs.kosem.ai/reference/api-conventions.md) for authentication, pagination and errors, and [https://docs.kosem.ai/openapi.yaml](https://docs.kosem.ai/openapi.yaml) for the full OpenAPI document.