ai.v1.AssistantService
ListAssistantKeys
ListAssistantKeys lists the assistant keys the assistant holds for the caller, at most one per account. An account without one has no account tools in a conversation. To turn the assistant's access off, revoke the keys with DeleteAssistantKeys; the assistant then stops using them. Errors: - UNAVAILABLE: SERVICE_UNAVAILABLE; retry later. - UNAUTHENTICATED: missing or invalid credentials.
Method
POST
Path
ai.v1.AssistantService/ListAssistantKeys
Service
ai.v1.AssistantService
Visibility
Authentication
Session token
MFA Requirement
Not required
POST
ai.v1.AssistantService/ListAssistantKeys Request
Testnet
curl --request POST \ \
--url 'https://api.testnet.polyester.com/ai.v1.AssistantService/ListAssistantKeys' \
--header 'Content-Type: application/json' \
--header 'Connect-Protocol-Version: 1' \
--data '{}'Responses
{
"keys": [
{
"keyId": "ak_1a3c6de8153d5a5b04cd2a6529779542",
"publicKeyEd25519": "AA==",
"state": "ACTIVE",
"subaccountId": "6789012345678"
}
]
}Request
ai.v1.ListAssistantKeysRequestResponse
ai.v1.ListAssistantKeysResponse 4 fields
subaccountId string (fixed64)
Subaccount the key acts on. Omitted for the main account. Public ID. ConnectRPC carries it as fixed64 (a decimal string in JSON).
keyId string
Opaque identifier of the API key.
publicKeyEd25519 string (byte)
Ed25519 public key, 32 bytes.
state enum
ACTIVE or DISABLED.
ACTIVE DISABLED
| Key | HTTP status | Connect code | Error | When |
|---|---|---|---|---|
| unauthenticated | 401 | unauthenticated | Unauthenticated | Authentication required. |
| permission-denied | 403 | permission_denied | Permission Denied | Permission denied. |
| invalid-argument | 400 | invalid_argument | Invalid Argument | Invalid argument. |
| not-found | 404 | not_found | Not Found | Not found. |
| unavailable | 503 | unavailable | Unavailable | Service unavailable. |