Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Open the native share sheet using the unified MiniKit API.
MiniKit.share()
import { MiniKit } from "@worldcoin/minikit-js"; import type { CommandResultByVia, MiniAppShareSuccessPayload, MiniKitShareOptions, } from "@worldcoin/minikit-js/commands"; export async function shareLink() { const input = { title: "Invite Link", text: "Use this invite code to join my mini app", url: "https://world.org", } satisfies MiniKitShareOptions; const result: CommandResultByVia< MiniAppShareSuccessPayload, MiniAppShareSuccessPayload, "minikit" > = await MiniKit.share(input); console.log(result.data.shared_files_count); }
type MiniKitShareOptions = { files?: File[]; title?: string; text?: string; url?: string; fallback?: () => unknown; };
type ShareResponse = | { executedWith: "minikit"; data: { status: "success"; version: number; shared_files_count: number; timestamp: string; }; } | { executedWith: "fallback"; data: unknown; };
{ "executedWith": "minikit", "data": { "status": "success", "version": 1, "shared_files_count": 2, "timestamp": "2026-03-28T18:24:00.000Z" } }
user_rejected
generic_error
invalid_file_name
Was this page helpful?