iMessage is live for replies only, on lines the Flow team connects to your app: the person always writes first, and your agent answers. It is not part of the sandbox. To get a line, ask the Flow team; build on the Telegram sandbox bot in the meantime, with the same code.
TypeScript
1. Get a line
- Sign in to the dashboard with GitHub and make a live key (
fk_live_...) on the Keys page. See Going live. - Ask the Flow team to connect an iMessage line to your app. iMessage lines are not self-serve:
POST /v1/senderswith"channel": "imessage"answers501 not_implemented. - With the live key,
GET /v1/senders?channel=imessagelists the line. Itsaddress.link, when set, is the line’s opt-in link: it opens Messages with the line and a prefilled text the person sends to start. - Run the code above, text the line from an iPhone or Mac, and your agent answers.
2. Bubbles fit iMessage
People read iMessage as short lines.reply() uses shorter bubbles here (about 400 characters before it cuts at a sentence end) than on Telegram. See Streaming replies.
3. Tapbacks and effects
- Reactions become tapbacks. iMessage has a fixed set, so with
fallback: "auto"(whichreact()sets) Flow uses the closest tapback, or skips the reaction and says so indelivered_as. - Effects send text with an iMessage effect:
TypeScript
slam, loud, gentle, invisible_ink, echo, spotlight, balloons, confetti, love, lasers, fireworks and celebration. Which ones a line can send may vary, so keep fallback: "auto" (plain text) on.
4. No buttons: use the fallback
iMessage has no buttons. Sendbuttons content with fallback: "auto" and Flow sends numbered text instead. When the person answers “2”, you still receive a button_reply with the second button’s id, so your code is the same on every channel.
TypeScript
5. Replies only
iMessage lines are personal-style numbers, and iMessage watches closely for unwanted messages. Flow protects your line:- The person writes first. Flow’s iMessage lines are reply-only: starting a conversation with a new contact (
POST /v1/messages) is refused with403 permission. Someone who has written to the line before is an open conversation, and replies to them are not budgeted. - Get people to write with the opt-in link. When the line has one, the sender’s
address.linkopens Messages with the line and a prefilled text the person sends to start. Put it on your site, receipts or a QR code. - No cold outreach. Sending the same text to many people, or messages that get no reply, can throttle the line (
sender_throttled).
6. What iMessage supports
Use
GET /v1/capabilities?conversation=conv_... for the live answer for a conversation.
7. Contacts
An iMessage contact’saddress.handle is a phone number or an email address. Do not assume a phone number. Reply into the conversation the person started rather than addressing them by handle.
Related
- Going live: live keys and iMessage lines.
- Content types