Initializing a Thirdweb Client

The ThirdwebClient class is the main entry point for interacting with the Thirdweb SDK.

You can pass the client to other methods to interact with wallets and smart contracts.

One client unlocks all thirdweb infrastructure services by default.


To start interacting with a deployed smart contract using the Thirdweb .NET SDK, first create a ThirdwebClient instance. You can create a client using either a secretKey for backend applications or a clientId for frontend applications. If your application is not web-based (has no origin), you should also provide a bundleId.

using Thirdweb;
// For native applications
var client = ThirdwebClient.Create(clientId: "yourClientId", bundleId: "yourBundleId");
// For frontend applications
var client = ThirdwebClient.Create(clientId: "yourClientId");
// For backend applications
var client = ThirdwebClient.Create(secretKey: "yourSecretKey");