Using The Launcher JWT

The simplest way to integrate your experience with Other Page 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.

1

Create your Experience using the API.

Request Example:

curl --request POST \
 --url https://api.other.page/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.

If you don’t already have hosting for your images you can upload them using Other Page Files.

To list an Experience you will need an API Key from Other Page Portal.

2

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:

{
 "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.other.page/m/avatar-n1x.png",
 "avatar": {
   "id": "8369bca7-8b61-4d0a-a88e-2a269f6ed993",
   "name": "Case",
   "image": "https://cdn.other.page/m/avatar-n1x.png",
   "tokenId": "1",
   "contract": "0xab2a61f6580098b4fc4e2d438a8c61984f731076",
   "chainId": "33139",
   "mmlUrl": "https://api.other.page/v1/m/mml/57533b91-4b42-4fd8-98db-a4ae57b1f3d7"
 }
}
3

Use the Launcher API

Attribute badges or send mintables at any point while the user is on your app.

View Launcher API Docs.

Example Badge Attribution:

curl --location 'https://api.other.page/v1/launcher/{id}/attribute-badge' \
--header 'X-Api-Key: {{your-experience-secret}}' \
--data '{
    "jwt": {{ jwt }},
    "badgeId": "0000-0000000-00000-00000-00000",
}'

Using Connect

If you are using Other Page Connect you can still make use of the launcher API endpoints by passing the connected user’s idToken in as the jwt, using your client_id, and including your client_secret in the X-Api-Key header.

Example:

curl --location 'https://api.other.page/v1/launcher/{client_id}/attribute-badge' \
--header 'X-Api-Key: {{your-client-secret}}' \
--data '{
    "jwt": {{ idToken }},
    "badgeId": "0000-0000000-00000-00000-00000",
}'