> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://reference.flatfile.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://reference.flatfile.com/_mcp/server.

**Learn how to use Environments for testing and authentication.**

[Environments](/api-reference/environments) are isolated entities and are intended to be a safe place to create and
test different configurations. Environments serve as self-contained, secure domains
where diverse configurations can be created and tested. By default, a development
and a production environment are set up.

| isProd  | Name          | Description                                                                                  |
| ------- | ------------- | -------------------------------------------------------------------------------------------- |
| *false* | `development` | Use this default environment, and it’s associated test API keys, as you build with Flatfile. |
| *true*  | `production`  | When you're ready to launch, create a new environment and swap out your keys.                |

> **Success**
>
> The development environment does not count towards your paid credits.

## Guest Authentication

Environments support two types of guest authentication:

1. `magic_link`: This method dispatches an email to your guests, which includes a magic link to facilitate login.
2. `shared_link`: This method transforms the Space URL into a public one, typically used in conjunction with embedded Flatfile.

### Additional Info

Should the `guestAuthentication` be left unspecified, both `magic_link` and `shared_link` types are enabled by default.

It's important to note that `guestAuthentication` settings can be applied at both Environment and Space levels. However, in case of any conflicting settings, the authentication type set at the Space level will take precedence over the Environment level setting. This flexibility enables customization based on specific needs, ensuring the right balance of accessibility and security.

## Secret and publishable keys

All Accounts have two key types for each environment. Learn when to use each type of key:

| Type            | Id                     | Description                                                                                                             |
| --------------- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| Secret key      | `sk_23ghsyuyshs7dcrty` | **On the server-side:** Store this securely in your server-side code. Don’t expose this key in an application.          |
| Publishable key | `pk_23ghsyuyshs7dcert` | **On the client-side:** Can be publicly-accessible in your application's client-side code. Use when embedding Flatfile. |

> **Warning**
>
> The publishable key only has permissions to create a Space.