Skip to main content
@photon-ai/advanced-imessage-kit is the legacy HTTP + Socket.IO-based iMessage SDK and is no longer recommended for new projects.
For new projects, use Spectrum for a unified, higher-level API across platforms, or @photon-ai/advanced-imessage when you need low-level iMessage control.

Installation

Quick start

SDK options

chatGuid format

chatGuid is the unique identifier for a conversation, in the format service;separator;address: Use any;-; when you want the SDK to automatically pick iMessage or SMS based on availability.

Connection events

Closing the client


Messages

sdk.messages covers sending, reacting, editing, unsending, querying, and real-time message events.

Sending

Message effects

Text styles & animations

Text styles and animations are not supported by the legacy SDK. Use @photon-ai/advanced-imessage for rich text formatting and message effects.

Reactions

Edit & unsend

Querying

Real-time events


Chats

sdk.chats handles listing conversations, managing group chats, typing indicators, and chat backgrounds.

Get chats

Create chat

Group chats

Chat status & typing

Chat background

Real-time events


Attachments

sdk.attachments handles sending and downloading files, images, audio messages, and stickers.

Send attachment

Send stickers

Download attachments


Scheduled Messages

sdk.scheduledMessages lets you schedule messages to send once or on a recurring interval.

Error Handling

The legacy SDK uses HTTP responses under the hood. Errors surface as thrown exceptions with an optional response property.
The SDK reconnects automatically via Socket.IO on transient disconnections.