# Generating your API Key

To generate an API key for accessing the Firstbase API, log in to the [Firstbase application](https://app.firstbasehq.com) as an Admin user. Once logged in, navigate to the Firstbase API tab under the Settings menu in the top navigation bar.

Next, provide a name for your token (e.g., “Development” or “Production”). By default, tokens never expire, but if you need to cycle them, you can delete old tokens through the Firstbase app UI.

**After creating the token, make sure to copy it to your clipboard and store it securely, such as in a password manager. You will not be able to retrieve it again.**

To maintain security and protect your data:

* Keep your API key confidential. Avoid exposing it in public repositories or client-side code.
* Regularly rotate your API keys. This reduces the risk of unauthorized access. If a key is compromised, revoke it immediately and generate a new one.
* Store API keys securely. Use a password manager or encrypted vault to prevent accidental exposure.


---

# Agent Instructions: 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://developers.firstbase.com/getting-started/generating-your-api-key.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.
