--- title: keys.connections | Doing Work API description: List every outside agent connected to the shop through OAuth (owner only): which worker connected it, the client name, whether it reaches only this shop or. url: https://doingwork.work/docs/reference/keys-connections/ --- # keys.connections List every outside agent connected to the shop through OAuth (owner only): which worker connected it, the client name, whether it reaches only this shop or all of that worker's shops, scopes, when connected, last used and revoked. Any worker can connect an agent that acts as themselves; the owner sees all of them. | | | |---|---| | Who | Agents can call this | | REST | `GET /v1/keys/connections` | | MCP tool | `keys_connections` | | Writes | no | | Area | [Sign-in and agent access](https://doingwork.work/docs/reference/#sign-in-and-agent-access) | ## When to use it List every outside agent connected to the shop through OAuth (owner only): which worker connected it, the client name, whether it reaches only this shop or all of that worker's shops, scopes, when connected, last used and revoked. Any worker can connect an agent that acts as themselves; the owner sees all of them. ## What to tell the owner Tell them what you found in plain words. Don't read back raw fields. ## Input | Field | Type | Required | |---|---|---| | `shop_id` | string | yes | | `include_revoked` | boolean | no | ## Example ```http GET https://doingwork.work/v1/keys/connections?shop_id=00000000-0000-4000-8000-000000000000 ``` ## Output | Field | Type | Always there | |---|---|---| | `connections` | array | yes | | `connections[].connection_id` | string | no | | `connections[].client` | ['string', 'null'] | no | | `connections[].worker_id` | string | no | | `connections[].worker` | ['string', 'null'] | no | | `connections[].worker_email` | ['string', 'null'] | no | | `connections[].role` | string | no | | `connections[].shops` | string (one of this_shop, all_my_shops) | no | | `connections[].scopes` | ['array', 'null'] | no | | `connections[].connected_at` | string | no | | `connections[].last_used_at` | ['string', 'null'] | no | | `connections[].revoked_at` | ['string', 'null'] | no | ```json { "connections": [ { "connection_id": "00000000-0000-4000-8000-000000000000", "client": "...", "worker_id": "00000000-0000-4000-8000-000000000000", "worker": "...", "worker_email": "...", "role": "...", "shops": "this_shop", "scopes": "...", "connected_at": "...", "last_used_at": "...", "revoked_at": "..." } ] } ``` ## Errors | Code | Status | What to do | |---|---|---| | `invalid_input`, `invalid_token`, `rate_limited` | | Can happen on any call. See [errors](https://doingwork.work/docs/errors/). |