Docs

Use API keys in your application

When working with backend environments (including React Server Components), you can use the secret key to instantiate the thirdweb Client:

import { createThirdwebClient } from "thirdweb";
const client = createThirdwebClient({
secretKey: "YOUR_SECRET_KEY", // Use secret key if using on the server, get it from dashboard settings
});

When using the Typescript SDK for frontend applications, use the client id:

import { createThirdwebClient } from "thirdweb";
const client = createThirdwebClient({
clientKey: "YOUR_CLIENT_ID", // Use client id if using on the client side, get it from dashboard settings
});

The client can be utilized to initiate contracts or used in some React components such as ConnectButton.