Appearance
Direct
What the person sees. Direct messages: the inbox, a conversation, the recipient picker for a new message or a group, a conversation's details with its shared media, the group name editor and a participant's nickname editor.
What you do. You open the inbox (DirectInboxScreen) and a conversation (DirectThreadScreen), write and react to messages, start a one-to-one conversation or a group through the recipient picker (DirectRecipientPickerScreen), look at a conversation's details (DirectThreadDetailsScreen) and its shared media (DirectThreadSharedMediaScreen), rename a group (DirectGroupNameAndPhotoEditorScreen) and give a participant a nickname (DirectThreadNicknameChangeScreen).
The inbox is the feed's Direct tab; a conversation is also reached from a profile's "Message" button.
Every example starts from session.json, the session Your first program saved, and names the screen it expects (screen: FeedTimelineScreen). The examples show the success path: errors are answered as in Errors, and challenges by your otherwise constant (Challenges: answer them once with otherwise).
ts
import { AndroidIgpapi, FeedTimelineScreen } from '@igpapi/android';
import { Effect } from 'effect';
import { readFile } from 'node:fs/promises';
// A checkpoint read back from your storage (see "Keep a session").
const saved = JSON.parse(await readFile('session.json', 'utf8'));The pages of this area
| Page | The screen |
|---|---|
| The Direct inbox | DirectInboxScreen, the feed's Direct tab |
| A conversation | DirectThreadScreen, a conversation and its messages |
| "New message": the recipient picker | DirectRecipientPickerScreen, "New message" and the new group |
| A conversation's details | DirectThreadDetailsScreen, a conversation's details hub |
| A conversation's shared media | DirectThreadSharedMediaScreen, the thread's shared media |
| The group name and photo editor | DirectGroupNameAndPhotoEditorScreen |
| A participant's nickname editor | DirectThreadNicknameChangeScreen |
The matrix
| # | The person... | Starts on | Actions | Result |
|---|---|---|---|---|
| 1 | Opens the Direct tab | the feed | openDirectTab(), threads | The inbox with its thread previews |
| 2 | Opens a conversation | the inbox | the thread item's open(), messages, participants | The conversation and its messages |
| 3 | Writes a message | a conversation | sendMessage(text) | The text broadcast to the conversation |
| 4 | Reacts to a message | a conversation | the message's react('like') | The reaction broadcast on that message |
| 5 | Starts a one-to-one conversation | the inbox | openNewMessage(), search(query), the recipient's or the thread's openThread() | The picker, its ranked recipients, then the conversation |
| 6 | Creates a group chat | the inbox | openNewMessage(), startGroupChat(), search(query), createGroup(rows) | The created group's conversation |
| 7 | Writes to someone from their profile | a profile | openDirectThread(), sendMessage(text) | The one-to-one conversation with that user |
| 8 | Looks at a conversation's details and media | a conversation | openThreadDetails(), openSharedMedia() | The details hub, then the shared media list |
| 9 | Renames a group | a group conversation | openThreadDetails(), openSharedMedia(), openGroupNameEditor(), changeName(name) | The group's new title |
| 10 | Gives a participant a nickname | a conversation | the participant's openNicknameEditor(), changeNickname(nickname) | The nickname changed |
Reading new messages
A conversation is a snapshot of what Instagram answered when you opened it. To read messages that arrived later, open the inbox and the conversation again.
The group name
The group name editor is opened from the shared media list (openGroupNameEditor()), which follows the conversation's details (scenario 9).
What these screens do not offer
Message requests (the inbox reads the main list only), sending photos or other media from a conversation, unsending a message, muting a conversation, deleting a chat, and leaving, hiding, restricting or blocking from a group's options. The app has them; the Simulator has no action for them.
Where the examples live
Each directory's README carries the examples of its own screen:
- Open the inbox —
inbox/ - Open a conversation, write a message, react, write from a profile —
thread/ - Start a one-to-one conversation, create a group chat —
recipient-picker/ - Look at the details and the shared media —
details/,shared-media/ - Rename a group —
group-editor/ - Give a participant a nickname —
nickname/