---
title: "Manage API keys"
url: /docs/en-us/cloud/auth/api-keys
last_updated: 2026-12-04T23:21:21Z
description: "Explains how to create API keys and add permissions to use Open Cloud web APIs for your gamee."
---

# Manage API keys

Open Cloud authenticates and authorizes API access with the use of API keys, which allow you to add granular permissions and security control for accessing and utilizing certain resources in your game, such as data stores and places.

All Open Cloud APIs require you to create an API key with valid permissions and include an `x-api-key` header in your request, which allows the application to authenticate to Open Cloud on your behalf.

## Create API keys

> **Warning:** All references to API keys in the text below refer to user-owned keys.

You can create and configure API keys to access your resources. An API key's access is determined by the permissions of the user who owns it. This means it can generally access any resource the user has permissions for, including their individual games and any [group-owned](/docs/en-us/projects/groups.md) games where they have the appropriate role. Some scopes can be restricted to specific games, but not all.

For details on how to create API keys for managing group resources, see the [Create API keys for managing group-owned resources](#create-api-keys-for-managing-group-owned-resources) section below.

To create an API key:

1. In the [Creator Dashboard](https://create--roblox--com.github.com/dashboard/creations), go to the [API Keys](https://create--roblox--com.github.com/dashboard/credentials?activeTab=ApiKeysTab) page.
2. Click the **Create API Key** button.
3. Enter a unique name for your API key. Use a name that can help you recall the purpose later, such as `PLACE_PUBLISHING_KEY` for publishing places to your game.
4. In the **Access Permissions** section, select an API from the **Select API System** menu. Repeat this step if you need to add multiple APIs to the key.
5. If applicable, select the game that you want to access with the API key. You can optionally disable **Restrict by Experience**. When disabled, your API key has access to all of your user-owned games and any group-owned games where you have the appropriate permissions, including any games you create in the future.
6. From the **Select Operations** dropdown, select the operations that you want to enable for the API key. Most operations in the [API reference](/docs/en-us/cloud.md) include the required permission scopes. For example, the [flush memory store](/docs/en-us/cloud/reference/MemoryStore#Cloud_FlushMemoryStore) operation requires the `universe.memory-store:flush` permission. For a list of all scopes and the APIs they support, see [Scopes](/docs/en-us/cloud/reference/scopes.md).
7. **OPTIONAL** In the **Security** section, explicitly restrict IP access to the key using [CIDR notation](#cidr-format). You can find the IP address of your local machine and add it to the **Accepted IP Addresses** section along with additional IP addresses for those that need access. If you don't have a fixed IP, or you are using the API key only in a local environment, you can leave the `Restrict IP addresses` toggle unchecked to allow any IP to use your API key.
8. **OPTIONAL** To add additional protection for your resources, set an expiration date for your key.
9. Click the **Save & Generate key** button.
10. Copy and save the API key string to a secure location, **not** a public repository for your code.
11. Verify the status of your API key on the [API Extensions](https://create--roblox--com.github.com/dashboard/credentials) page of **Creator Dashboard**.

> **Warning:** The API key string is equivalent to a password for your application. Never share it with untrusted parties, such as anyone outside of your development team.
### Create API keys from prefill links

A prefill link opens the API key creation form with permissions already selected for a tool or task. You can edit these permissions before creating the key, which belongs to the account you sign in with.

> **Warning:** Only use prefill links from trusted sources. A link can request more permissions than your task requires. Before creating the key, review the selected resources and operations and remove any you don't need. Never share the generated key with third-party app providers.

To create an API key from a prefill link:

1. Open the link and sign in. For group automation, use a [dedicated account](#create-api-keys-for-managing-group-owned-resources). If the form doesn't open after sign-in, open the original link again.
2. Enter a unique name for your API key.
3. If prompted, select one or more experiences or creators for each API system, then click **Done**. Each system can use different resources. Requests left without a selected resource are skipped.
4. Review **Access Permissions**, including any permissions the form couldn't add. Keep only the resources and operations needed for your task.
5. Optionally, restrict IP access and set an expiration date as described in [Create API keys](#create-api-keys).
6. Click **Save & Generate key**, then copy and save the key to a secure location.

The link doesn't create a key automatically or send it to the link's author. Use the generated key in the `x-api-key` header for API requests.

### Build prefill links

Do not use prefill links to request API keys from other Roblox users. This violates the [Creator Third-Party App Policy](https://en--help--roblox--com.github.com/hc/en-us/articles/37924211313044-Creator-Third-Party-App-Policy). Use OAuth 2.0 to request access to their resources.

To include a prefill link in your tool's documentation, use this URL format:

```text
https://create--roblox--com.github.com/dashboard/credentials?prefill=1&scope={scopeType}:{target}:{operations}
```

- Include `prefill=1` exactly once.
- Add a `scope` parameter for each scope type and resource target. Use IDs from [Scopes](/docs/en-us/cloud/reference/scopes.md), such as `universe.place` and `read,write`. Separate operations with commas.
- URL-encode each complete `scope` value. `URLSearchParams` handles this in the examples below.

Use the target format that matches the scope:

| Target | Meaning |
| --- | --- |
| Empty | Let the user select resources for the API system. Each selection receives that system's permissions with empty targets. |
| Universe ID | Restrict access to one experience. Use its universe ID, not a place ID. |
| `U` | Use the signed-in user as the creator target. |
| `G{groupId}` | Use the specified group as the creator target. |
| `{universeId},{encodedDataStoreName}` | Restrict a data store scope to a named data store. To include all data stores, use only the universe ID, with no trailing comma. |
| `*` | Request all resources supported by the scope, subject to the key owner's permissions. |

Use positive whole-number universe and group IDs without leading zeros. For a scope without a resource target, use an empty target or `*`. An empty data store target includes all data stores in each experience the user selects.

Let users select experiences for place read and write access:

```javascript
const url = new URL('https://create--roblox--com.github.com/dashboard/credentials');
url.searchParams.set('prefill', '1');
url.searchParams.append('scope', 'universe.place::read,write');
const prefillLink = url.toString();
```

Repeat `scope` for multiple experiences. Replace these sample universe IDs with your own. Commas within a target separate its parts, not different experiences.

```javascript
const url = new URL('https://create--roblox--com.github.com/dashboard/credentials');
url.searchParams.set('prefill', '1');
url.searchParams.append('scope', 'universe.place:6123456789:read,write');
url.searchParams.append('scope', 'universe.place:7000000001:read,write');
const prefillLink = url.toString();
```

Encode a data store name before adding the scope to preserve colons and commas:

```javascript
const url = new URL('https://create--roblox--com.github.com/dashboard/credentials');
url.searchParams.set('prefill', '1');
const dataStoreName = encodeURIComponent('my:store,v2');
url.searchParams.append(
  'scope',
  \`universe-datastores.objects:6123456789,${dataStoreName}:read,list\`
);
const prefillLink = url.toString();
```

A link must contain 1–100 `scope` parameters and be no longer than 4,096 bytes for the full URL in UTF-8. Never include an API key or other secret in the link. The form rejects links with invalid or repeated `prefill` parameters or links that exceed these limits.

Individual invalid or unavailable permissions are skipped and listed. The form also skips these unsupported combinations:

- `*` entries combined with specific or empty targets in the same API system.
- Scopes without resource targets in an API system that also contains targeted scopes.
- Empty data store names, `*` as a data store name, names equal to the universe ID, or reserved names such as `constructor` and `__proto__`.

Before sharing a link, check that the form includes the intended permissions.

## Create API keys for managing group-owned resources

An API key grants access to all resources the user account has permissions for, including personal games outside of the group. If you use your personal account's API key for group automation and that key is compromised, other resources you have access to are also at risk.

To prevent this, we **strongly recommend** creating a separate API key on a dedicated alternate account with access strictly limited to the target group. This new account dedicated for automation purposes should only be given access to the target group and granted the minimal permissions required for its task.

1. Create a new, dedicated Roblox account for your automation.
2. Invite the new account to your group.
3. Assign it a group role with only the permissions required for its task.
4. Log in to the new account and follow the steps in the section above to [create an API key](#create-api-keys).
5. Use the generated API key for group resource automation.

## Best Practices For Managing API Keys

API keys are sensitive credentials that should be kept secure to prevent unauthorized access to your data. Here are some best practices for managing API keys.

- **Create separate keys for each application**: Create separate API keys for each application or use case to isolate access and reduce the impact if a key is compromised.
- **Select the minimum permissions needed**: When configuring scopes, select the minimum permissions necessary for the key's intended use. For those scopes that allow you to restrict scope access by game, limit access to only the specific games that are needed.
- **Use IP address restrictions**: Restrict API key access to specific IP addresses or CIDR ranges to prevent unauthorized usage from unknown locations. Do not use IP address restrictions when using your API key in Roblox places to ensure your key can be used with Roblox servers.
- **Set expiration dates**: For short-term use cases, configure expiration dates to automatically disable keys after a set period, reducing the risk if a key is compromised. Setting expiration dates is not recommended for longer-term use cases unless you have a key rotation process in place, as your automation can unexpectedly fail when the key expires.
- **Use dedicated alternate accounts for group resource management**: Use a dedicated account with minimal permissions for group resource management, as detailed in the [Create API keys for managing group-owned resources](#create-api-keys-for-managing-group-owned-resources) section.
- **Store API keys securely**: Never store API keys directly in your source code, version control systems, or scripts where they could be exposed. Use a secrets management system for storing and controlling access to your keys. In Roblox places, use a [Secrets Store](/docs/en-us/cloud-services/secrets.md).
- **Do not share API keys through public channels**: Never share API keys through public communication channels, forums, or social media. Only share keys through secure, private channels with trusted team members. Limit access to who you share your keys with to minimize the blast radius if a key is compromised.

## CIDR format

To further protect your resources, when [creating an API key](#create-api-keys), specify IP addresses that can access the API key with either normal IP addresses or using the [CIDR notation](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation). A CIDR IP address looks like a normal IP address except it ends with a slash and a decimal that represents how many bits of the IP address are significant for network routing:

- **Normal**: 192.168.0.0
- **CIDR**: 192.168.0.0/24

The former part is the IP address and the latter part is the **netmask**, counting the bits of 1s in binary format. In the previous example, **24** means **255.255.255.0** (24 1s) that allows all IPs between **192.168.0.0** and **192.168.0.255**. Understanding CIDR format is particularly useful if you plan to run your applications on a server.

## API key status

API keys initially have an active status, but they can become inactive over their lifetime. To learn why an API key has changed status and how to return the API key back to an active status, see the following table.

> **Warning:** If you or your group don't use or update an API key for 60 days, it automatically expires, even if it doesn't have a set expiration date. This reduces the risk of bad actors using old API keys. If you're no longer using an API key, you should manually disable or delete it.

| Status | Reason | Resolution |
| --- | --- | --- |
| Active | No issues. The user can use the key to authenticate API calls. | N/A |
| Disabled | The user disabled the key by disabling the **Enable Key** toggle. | Enable the **Enable Key** toggle. |
| Expired | The key's expiration date has passed. | Either remove or set a new expiration date. |
| Auto-Expired | The user hasn't used or updated the key in the past 60 days. | You can either disable then enable the **Enable Key** toggle, or you can update any of the key's properties, such as the name, description, or expiration date. |
| Revoked | For group keys only. The account that generated the key no longer has the sufficient access permission to manage the group's keys. | Click the **Regenerate Key** to get a new secret. |
| Moderated | A Roblox admin changed the key's secret for security reasons. | Click the **Regenerate Key** to get a new secret. |
| User Moderated | The account that generated the key is under moderation by Roblox. | Resolve the moderation issue on the account. |

## Introspect API keys

### `POST` api-keys/v1/introspect

Retrieve information about an API key. Verifies whether the key can be used from the requester's IP address and whether the key or the last generated user is moderated.

#### Request

`(application/json)`

| Key | Value |
| --- | --- |
| apiKey | `<api_key>` |

```bash
curl --location --request POST 'https://apis--roblox--com.github.com/api-keys/v1/introspect' \
--header 'Content-Type: application/json' \
--data '{
    "apiKey": "your-api-key"
}'
```

#### Response

There are four possible resource identifiers that can be present in each scope object:

- userId
- groupId
- universeId
- universeDatastore

The userId and groupId identifiers are only relevant to scopes with the creator target. The universeDatastore identifier is only relevant to scopes with the universe-datastore target. The resource identifier will be omitted for scopes that do not support resource selection.

An asterisk (`*`) in the resource identifier list indicates that the scope has permission on all resources of that type.

```json
{
  "name": "test key",
  "authorizedUserId": 234,
  "scopes": [
    {
      "name": "universe-datastores.objects",
      "operations": [
        "create"
      ],
      "universeDatastores": [
        {
          "universeId": "123",
          "datastoreName": "playerData"
        }
      ]
    },
    {
      "name": "asset",
      "operations": [
        "write"
      ],
      "groupIds": [
        "*"
      ],
      "userIds": [
        "*"
      ]
    }
  ],
  "enabled": true,
  "expired": false,
  "expirationTimeUtc": "2026-01-01T12:00:00.000Z"
}
```