Docs

Quickstart

Learn how to add Connect SDK to your application, log in your users, and allow them to interact with your application.

The following guide is in Typescript. You can also learn how to integrate Connect with our Unity SDK.


Install the Connect SDK

npm i thirdweb

Get Your Client ID

Log in to the thirdweb dashboard. Navigate to the Settings page and create an API key to get your Client ID.

Set up the Connect SDK

import { ThirdwebProvider, ConnectButton, createThirdwebClient } from "thirdweb/react";
const client = createThirdwebClient({ clientId: <your_client_id> });
export default function App() {
return (
<ThirdwebProvider>
<ConnectButton client={client} />
</ThirdwebProvider>
);
}

Interact With A Wallet

Once your user has logged in, interact with the application using different functions such as fetching balances and wallet addresses:

import { useActiveAccount } from "thirdweb/react";
// get wallet address
const account = useActiveAccount();
console.log("wallet address", account.address);
// get balance
const balance = await getWalletBalance({
client,
chain,
address: account.address,
});
console.log("wallet balance", balance);

View the full reference.

You’re Ready to web3

With Connect instantiated and your user logged in, you can now access all the powerful features your app needs to succeed!