> For the complete documentation index, see [llms.txt](https://keykeeper.gitbook.io/keykeeper-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://keykeeper.gitbook.io/keykeeper-docs/key-management-and-redemption.md).

# Key Management and Redemption

KeyKeeper allows admins to manage game keys, assign them to users, and track their redemption. Game keys are essential for controlling access to testing groups, and they come with the following statuses:

## Key Statuses:

* **Unused**: The key has not been claimed by any user.
* **Redeemed**: The key has been used by a user to join the group.
* **Revoked**: The key has been revoked by an admin and is no longer valid.

### Key Redemption Process:

1. Admins generate keys for a group using the `/generate-codes` command.
2. Users claim the key with the `/claim-key` command, which then gives them access to the group and any corresponding roles.
3. Admins can revoke keys to remove access using the `/revoke-keys` command. This will also delete the key from the system and remove the associated role from the user.
4. If a key has no game keys remaining, it will not be marked as redeemed, allowing it to be restocked and reused later.

### Importing and Exporting Keys:

* **Importing**: You can import game keys from a file with the `/import-keys` command.
* **Exporting**: You can export key data in different statuses (unused, redeemed, or all) using the `/export-codes` command.

### Redeeming Keys:

Users redeem keys using the `/redeem-code` command. Once a key is redeemed, it will become associated with the user and the group.

### Viewing Your Keys:

To see all the keys you currently have access to, use the `/list-my-keys` command. This will display the groups and the keys assigned to you.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://keykeeper.gitbook.io/keykeeper-docs/key-management-and-redemption.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
