> ## Documentation Index
> Fetch the complete documentation index at: https://docs.world.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Share Contacts

> Open the native contact picker using the unified MiniKit API.

Use `MiniKit.shareContacts()` to open the World App contact picker.

## Basic Usage

<CodeGroup>
  ```tsx title="Example" theme={null}
  import { MiniKit } from "@worldcoin/minikit-js";
  import type {
    CommandResultByVia,
    MiniKitShareContactsOptions,
    ShareContactsResult,
  } from "@worldcoin/minikit-js/commands";

  export async function pickContacts() {
    const input = {
      isMultiSelectEnabled: true,
      inviteMessage: "Join me in this mini app",
    } satisfies MiniKitShareContactsOptions;

    const result: CommandResultByVia<
      ShareContactsResult,
      ShareContactsResult,
      "minikit"
    > = await MiniKit.shareContacts(input);

    console.log(result.data.contacts);
  }
  ```

  ```ts title="Type" theme={null}
  type MiniKitShareContactsOptions = {
    isMultiSelectEnabled?: boolean;
    inviteMessage?: string;
    fallback?: () => unknown;
  };
  ```
</CodeGroup>

## Result

<CodeGroup>
  ```ts title="Type" theme={null}
  type ShareContactsResponse =
    | {
        executedWith: "minikit";
        data: {
          contacts: Array<{
            username: string;
            walletAddress: string;
            profilePictureUrl: string | null;
          }>;
          timestamp: string;
        };
      }
    | {
        executedWith: "fallback";
        data: unknown;
      };
  ```

  ```json title="Example" theme={null}
  {
    "executedWith": "minikit",
    "data": {
      "contacts": [
        {
          "username": "alex",
          "walletAddress": "0x1234567890123456789012345678901234567890",
          "profilePictureUrl": "https://cdn.example.com/profile/alex.png"
        }
      ],
      "timestamp": "2026-03-28T18:24:00.000Z"
    }
  }
  ```
</CodeGroup>

## Error Codes

| Code            | Meaning                       |
| --------------- | ----------------------------- |
| `user_rejected` | The user rejected the request |
| `generic_error` | Unexpected failure            |

## Fallback Behavior

Define a custom fallback in the command payload for support outside mini apps.

## Preview

<div className="grid justify-items-center text-center">
  <video className="m-auto" width="300" autoPlay muted loop playsInline>
    <source src="https://mintcdn.com/tfh/QgV5KXRTJlR7G1Sc/images/docs/mini-apps/commands/contacts-command.mp4?fit=max&auto=format&n=QgV5KXRTJlR7G1Sc&q=85&s=1b8bea8f658dfdee32c7cb7a4da02fae" type="video/mp4" data-path="images/docs/mini-apps/commands/contacts-command.mp4" />

    Your browser does not support the video tag.
  </video>
</div>
