World Mini Apps are native-like applications that run inside World App, giving you access to millions of verified human users.With the new World Chat (powered by XMTP), your mini apps can integrate with messaging—opening directly in conversations, accessing group context, and sharing content back to chat.This guide shows how to integrate Privy with World Mini Apps for authentication and wallet management. If you’re building mini apps across multiple platforms, Privy’s account linking enables users to access your app on World, Farcaster, and Base App with the same account and embedded wallet.
World Mini Apps Docs
Official documentation for building World Mini Apps.
World Developer Portal
Register your mini app and manage API keys.
XMTP Documentation
Learn about XMTP, the protocol powering World Chat.
Building for multiple platforms? If you’re building on World, Farcaster, and Base App, Privy’s
account linking lets users connect their accounts across platforms and access the same embedded
wallet everywhere.
If you’re building mini apps for other platforms like Farcaster and Base App, account linking helps users access the same embedded wallet from any platform. Users can link their login methods and maintain access to their embedded wallet and data across all platforms.
Link World wallet to existing accounts
If a user already has a Privy account (from Farcaster, email, etc.) and wants to access it from your World mini app, they can link their World wallet:
Report incorrect code
Copy
Ask AI
import {useLinkWithSiwe} from '@privy-io/react-auth';import MiniKit from '@worldcoin/minikit-js';const {generateSiweNonce, linkWithSiwe} = useLinkWithSiwe();const handleLinkWorldWallet = async () => { // Get nonce from Privy const privyNonce = await generateSiweNonce(); // Request signature from World wallet const {finalPayload} = await MiniKit.commandsAsync.walletAuth({ nonce: privyNonce, }); // Link wallet await linkWithSiwe({ message: finalPayload.message, signature: finalPayload.signature, });};
Link other accounts
Users can link additional login methods to their account:
Report incorrect code
Copy
Ask AI
import {useLinkAccount} from '@privy-io/react-auth';const {linkFarcaster, linkEmail, linkGoogle} = useLinkAccount();// Link additional login methodslinkFarcaster();linkEmail();linkGoogle();
The new World Chat (powered by XMTP) adds messaging capabilities to mini apps.You can detect when your mini app is opened from a chat and share content back to conversations. The World MiniKit SDK provides features like:
sdk.location - Detect where your app was opened (chat, home, app store, etc.)
sdk.context.getGroupMembers - Get group member info when opened from chat
sdk.commands.chat - Share content back to chat with link previews
Example: Detect chat context and share results:
Report incorrect code
Copy
Ask AI
import MiniKit from '@worldcoin/minikit-js';// Check where app was openedif (MiniKit.location === 'chat') { const members = await MiniKit.context.getGroupMembers(); console.log(`Opened in chat with ${members.length} members`);}// Share to chatawait MiniKit.commands.chat({ message: 'Check out my score!', to: ['username1'] // Optional});
For full World Chat SDK docs, see World’s documentation. The
SDK is currently in preview.