Guide

Create Publishable API Key

Overview

Supabase provides fine-grained API key management to control which application components can access your project's data. Publishable API keys are specifically designed for client-side and frontend applications, offering a secure way to authenticate requests without exposing your service role key. This workflow guides you through creating a new publishable key in your Supabase project settings, allowing you to assign descriptive names and maintain multiple keys for different applications or environments.

Before you begin

  • Active Supabase account (free or paid) at supabase.com
  • At least one Supabase project already created
  • Owner or Administrator role in the target project
  • Access to Project Settings (typically available to project owners and administrators)

Step by step

1
ClickProject Settings

Navigate to your project's settings by clicking the Project Settings link in the Supabase navigation. This opens the main settings panel where you can manage API keys and other project configuration.

Tip. Project Settings is typically located in the left sidebar or top navigation of your Supabase dashboard.
Step 1
2
ClickAPI Keys

Select API Keys from the settings menu. This displays the API Keys management page where all your project's keys are listed and new keys can be created.

Tip. Look for the API Keys menu item in the left sidebar under Project Settings. This is where you manage both publishable and service role keys.
Step 2
3
ClickNew publishable key

Click the 'New publishable key' button to initiate creation of a new publishable API key. A form or dialog will appear where you can enter details for the new key.

Tip. Ensure you are selecting 'New publishable key' and not 'New service role key'—the buttons may be adjacent to each other.
Step 3
4
Typename

Enter a descriptive name for the publishable API key in the name field. Use a clear name that identifies the application, environment, or purpose (e.g., 'web-app-production' or 'mobile-client-v1').

Tip. Use naming conventions that help you identify the key's purpose later. Avoid generic names like 'key1' or 'test' to maintain clarity when managing multiple keys.
5
ClickCreate Publishable API key

Click the 'Create Publishable API key' button to complete the creation process. Supabase will generate the key and display it for you to copy.

Warning. Copy and securely save the key immediately after creation. Some systems only display the full key once; if you navigate away without copying, you may need to delete and recreate the key.
Step 5
6
Clickbutton

Click the confirm or close button to finish and return to the API Keys list. The new publishable key will now appear in your keys table and be available for use in your applications.

Tip. After this step, verify that your new key is visible in the API Keys list with the correct name and 'Publishable' type designation.
Step 6

Confirm it worked

  1. 1The new publishable API key appears in the API Keys list with the name you specified
  2. 2The key is marked as 'Publishable' type in the keys table
  3. 3A confirmation message or success notification displays after creation
  4. 4You can copy the key value to use in your client-side application

Common issues

Keep reading