Usage
Parameters
domain
- Type:
string
path (optional)
- Type:
string
url: The URL of the Mini App to open. This can be either:- A Mini App embed URL (e.g.,
https://example.com/specific-page) - A Mini App launch URL (e.g.,
https://farcaster.xyz/miniapps/[id]/[name])
- A Mini App embed URL (e.g.,
Return Value
Promise<void>
The promise resolves when navigation is successful. If navigation fails, the promise will be rejected with an error.
Error Handling
Always await theopenMiniApp call and handle potential errors:
Referrer Information
When a Mini App is opened usingopenMiniApp, the target app receives a special location context with referrer information:
Use Cases
Hub or Portfolio Apps
Create a central hub that showcases multiple Mini Apps:Referral Systems
Implement referral tracking between Mini Apps:Notes
- This will prompt the user to open the new app
- The current Mini App will be closed when the new app is opened
- There is no way to navigate back to the original app
- The opened Mini App will receive a
location.typeof'open_miniapp'with areferrerDomainindicating where the user came from

