Create Confluent Cloud API Keys¶
API keys are required to produce or consume to your Kafka topic and are required for using Schema Registry. Separate API keys are required for Kafka and Schema Registry. You can create API keys by using either the Confluent Cloud CLI or web interface.
Create API Keys using the CLI¶
- Prerequisites:
- Access to Confluent Cloud with an active cluster.
- Confluent Cloud CLI is installed.
Log in to your cluster using the ccloud login command with the cluster URL specified.
ccloud login
Enter your Confluent Cloud credentials: Email: susan@myemail.com Password:
Create the API key and secret with the Kafka or Schema Registry resource ID (
<resource-id>
) specified and save the output. You can find the Kafka resource ID by using theccloud kafka cluster list
command. You can find the Schema Registry resource ID by using theccloud schema-registry cluster describe
command.ccloud api-key create --resource <resource-id>
Your output should resemble:
Save the API key and secret. The key/secret is not retrievable later. +---------+------------------------------------------------------------------+ | API Key | KIELS5LZKXCBOT9L | | Secret | XVLE434R43R532RFSASDeaatawefafeazzzeeeeeelllll4354t5345452432x | +---------+------------------------------------------------------------------+
Tip
To use an existing API key and secret, run this command with the resource ID (
<resource-id>
), API key (<api-key>
), and API secret (<api-secret>
) specified. This command registers an API key and secret created by another process and stores it locally.ccloud api-key store <api-key> <api-secret> --resource <resource-id>
Associate the Kafka API key and secret with this cluster. This step is not necessary for Schema Registry resources.
ccloud api-key use <api-key>
Create Kafka API Keys in the UI¶
- Prerequisite:
- Access to Confluent Cloud with an active cluster.
Sign in to Confluent Cloud at https://confluent.cloud.
Select a cluster name and then click Cluster settings.
Click the API access tab and then click Create key.
You should see this output.
Save the Kafka API key and secret.
Create Schema Registry API Keys in the UI¶
To use Confluent Cloud Schema Registry for managing Kafka clusters, you need an API key specific to Schema Registry.
- Prerequisite:
- Access to Confluent Cloud with an active cluster.
Sign in to Confluent Cloud at https://confluent.cloud.
Click Schemas on the navigation bar.
Click the API access tab and then click + Add key.
You should see this output.
Save the Schema Registry API key and secret.