Skip to main content
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.
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.

Setup

First, configure a World developer account, scaffold a mini app project, and integrate Privy.
1

Configure your World developer account

Create a World developer account and mini app at the World Developer Portal.Get your App ID and API key for your mini app.
2

Create your World Mini App

Scaffold a new World Mini App using the official template:
npx @worldcoin/create-mini-app@latest my-mini-app
Follow the prompts to configure your app with your World App ID and API key.
3

Set up Privy

If you haven’t set up Privy yet, follow our React quickstart guide.

Authenticate users with World wallet

Use Privy’s useLoginWithSiwe hook to authenticate users via their World wallet:
import {useLoginWithSiwe} from '@privy-io/react-auth';
import MiniKit from '@worldcoin/minikit-js';

const {generateSiweNonce, loginWithSiwe} = useLoginWithSiwe();

const handleLogin = async () => {
  // Get nonce from Privy
  const privyNonce = await generateSiweNonce();

  // Request signature from World wallet
  const {finalPayload} = await MiniKit.commandsAsync.walletAuth({
    nonce: privyNonce
  });

  // Log in with Privy
  await loginWithSiwe({
    message: finalPayload.message,
    signature: finalPayload.signature
  });
};
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.

World Chat features

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:
import MiniKit from '@worldcoin/minikit-js';

// Check where app was opened
if (MiniKit.location === 'chat') {
  const members = await MiniKit.context.getGroupMembers();
  console.log(`Opened in chat with ${members.length} members`);
}

// Share to chat
await 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.

Example use cases

With World Chat’s social features, you can build:
  • Group betting - See members’ bets, share results to chat
  • Collaborative tools - Shared lists, planning, games with group context
  • Commerce - Split bills, group purchases in chat
  • Gaming - Multiplayer games that share achievements to chat