> For the complete documentation index, see [llms.txt](https://docs.roleplaybot.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roleplaybot.xyz/api/guides/authorization.md).

# API Authorization

{% hint style="danger" %}
The API has been deprecated and is no longer in use.
{% endhint %}

To access RoleplayBot's API you must have an Authorization key, These keys are used to secure the API and keep data safe, Without Authorization keys anyone would be able to access and delete your data. These keys are used in request headers alongside your guild to communicate with the server and request specific data.

### Getting a key

To create an API key you can head over to <https://dashboard.roleplaybot.xyz/guilds>, Select your guilds and generate an API key. Alternatively inside your discord guild use RoleplayBot's integrated command `/api key view,` This will create an API key if one doesn't exist (Restricted to Administrators only). You can also view the API key using the same command.&#x20;

### Requesting deletion of a key

If your API key was generated through the dashboard then head over to <https://dashboard.roleplaybot.xyz/guilds>, Select your guild and delete the API Key. Alternatively If your key has been exposed or you want it changed then directly contact RoleplayBot's API support team through our [support server](https://roleplaybot.xyz/support). Furthermore, You can use the command `/api key delete` to instantly delete your API key inside your discord server.


---

# 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://docs.roleplaybot.xyz/api/guides/authorization.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.
