Wallets

Get Started

Create wallets for your users with flexible authentication options. Choose from email/phone verification, social OAuth, passkeys, or external wallet connections.

API Authentication

For email, phone, passkey, or SIWE authentication, a two-step process is used:

  • Initiate authentication to get a challenge
  • Complete authentication with the challenge response

For guest or custom (jwt/auth-payload) authentication, you can skip the first step and directly use the /v1/auth/complete endpoint with the required parameters.

Initiate Authentication

Start authentication with email, phone, passkey, or SIWE

Request

Loading...

Response

{
"method": "sms",
"success": true
}

Complete Authentication

Verify and complete the authentication process:

Request

Loading...

Response

{
"isNewUser": true,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"type": "email",
"walletAddress": "0x742d35Cc6634C0532925a3b8D43C67B8c8B3E9C6"
}

Social Authentication

Single Step Flow

OAuth is done in a single step using a dedicated endpoint.

Visit the API reference for more details on the available social providers and code snippets.

Request

fetch("https://api.thirdweb.com/v1/auth/social", {
method: "GET",
headers: {
"x-client-id": "<your-project-client-id>",
},
});

Response

{
"message": "Redirects to OAuth provider for authentication"
}

Get Wallet Information

Retrieve authenticated user's wallet details:

Request

fetch("https://api.thirdweb.com/v1/wallets/me", {
method: "GET",
headers: {
"x-secret-key": "<your-project-secret-key>",
},
});

Response

{
"result": {
"address": "string",
"profiles": [
{
"email": "string",
"emailVerified": true,
"hd": "string",
"id": "string",
"locale": "string",
"picture": "string",
"type": "google",
"familyName": "string",
"givenName": "string",
"name": "string"
}
],
"createdAt": "string",
"smartWalletAddress": "string",
"publicKey": "string"
}
}

Going further

To connect with other auth strategies, use external wallets, or sponsor gas for users, check out the following guides:

Explore Full API References

For comprehensive guides on implementing the full thirdweb SDK, explore our language-specific documentation: