appRequest (22)
The appRequest message is sent to invite another peer to start a Mini-App session. It identifies which app to launch and provides initial data for the session setup.
This is the first message in the Mini-App lifecycle. The recipient can respond with appRequestAccept, appRequestReject, or appRequestError.
Core Data Types
IxiBytes: See IxiBytes Encoding.string: A standard UTF-8 encoded string.
Payload Structure
The payload is an AppDataMessage object with app identification information.
| Field | Data Type | Min | Max | Description |
|---|---|---|---|---|
sessionId | IxiBytes | * | * | A unique identifier for this session, generated by the requester. Used to track all subsequent messages in this session. |
data | IxiBytes | 0 | * | Optional. Application-specific initialization data (e.g., game parameters, room ID, initial state). |
appId | string | 1 | * | The unique identifier of the Mini-App to launch (e.g., com.company.appname). Used by the recipient to determine which app should handle this session. |
Behavioral Notes
- Trigger: This message is sent when a user initiates a Mini-App session with a contact (e.g., starting a game, sharing a document).
- Session Creation: The
sessionIdmust be unique and is used for all subsequent messages in this session (appData,appEndSession, etc.). - Response Flow: The recipient should respond with one of:
appRequestAccept- User accepts and the session becomes activeappRequestReject- User declines the invitationappRequestError- Technical issue prevents session start (app not installed, invalid data, etc.)
- App Identification: The
appIdfield allows the recipient to launch the correct Mini-App. If the app is not installed, the recipient should sendappRequestError.