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

# External Experiences

> Connect to your app or game from the OpenPage experiences directory, enabling the use of web3 avatars, on-chain badges, leaderboards, and more.

## Using The Launcher JWT

The simplest way to integrate your experience with OpenPage is to make use of the launcher JWT. This approach works by directing a user to your experience with a session JWT included in the URL.

<Steps>
  <Step title="Create your Experience using the API.">
    Request Example:

    ```bash theme={null}
    curl --request POST \
     --url https://api.openpage.fun/v1/community/{id}/experience \
     --header 'Content-Type: application/json' \
     --header 'X-Api-Key: <api-key>' \
     --data '{
     "name": "<string>",
     "type": "web",
     "description": "<string>",
     "imageUrl": "<string>",
     "bannerUrl": "<string>"
    }''
    ```

    After creating your experience you will receive an experience `id` and `secret`. Save these as they will be needed to make use of the launcher API endpoints in the next steps.

    <Note>
      If you don't already have hosting for your images you can upload them using [OpenPage Files](/api-reference/community-files/create-a-file-upload).
    </Note>

    <Warning><p>To list an Experience you will need an API Key from [OpenPage Portal](https://portal.openpage.fun).</p></Warning>
  </Step>

  <Step title="Receive a JWT">
    Receive a JWT auth token in the URL when a user is directed to your experience containing the user's wallet address and avatar information.

    `https://yourexperience.com?token=eyJhbGciOiJIUzI1...`

    Decoded JWT Example:

    ```json theme={null}
    {
     "sub": "08a7acaa-3ab5-45c9-90d4-86a2e07e749d",
     "aud": "eb6fda08-fcb9-4e51-af37-0e258447b014",
     "nonce": "random-nonce",
     "wallet": "0xe46dbac7a9c515c016c3d36c721c62c09faaf211",
     "iss": "http://127.0.0.1:3003",
     "exp": 1743674033,
     "iat": 1743670433,
     "username": "m1kr.eth",
     "name": "Case",
     "picture": "https://cdn.openpage.fun/m/avatar-n1x.png",
     "avatar": {
       "id": "8369bca7-8b61-4d0a-a88e-2a269f6ed993",
       "name": "Case",
       "image": "https://cdn.openpage.fun/m/avatar-n1x.png",
       "tokenId": "1",
       "contract": "0xab2a61f6580098b4fc4e2d438a8c61984f731076",
       "chainId": "33139",
       "mmlUrl": "https://api.openpage.fun/v1/m/mml/57533b91-4b42-4fd8-98db-a4ae57b1f3d7"
     }
    }
    ```
  </Step>

  <Step title="Use the Launcher API">
    Attribute badges or send mintables at any point while the user is on your app. <p>[View Launcher API Docs](/api-reference/launcher/create-badge-attribution).</p>

    **Example Badge Attribution:**

    ```bash theme={null}
    curl --location 'https://api.openpage.fun/v1/launcher/{id}/attribute-badge' \
    --header 'X-Api-Key: {{your-experience-secret}}' \
    --data '{
        "jwt": {{ jwt }},
        "badgeId": "0000-0000000-00000-00000-00000",
    }'
    ```
  </Step>
</Steps>
