@imessage-sdk/photon
v0.1.2
Published
Photon Cloud provider for imessage-sdk
Maintainers
Readme
@imessage-sdk/photon
Photon Cloud provider for imessage-sdk.
Install
pnpm add imessage-sdk @imessage-sdk/photonUsage
import { photon } from '@imessage-sdk/photon';
import { createIMessageClient } from 'imessage-sdk';
const client = createIMessageClient({
provider: photon(),
});
await client.messages.send({
to: { kind: 'phone', value: '+15551234567' },
text: 'Hello from Photon',
});Inbound Photon attachments retain their provider-native ID and can be downloaded through the normalized client. The SDK consumes Photon’s authenticated byte stream and returns the primary attachment bytes:
const data = await client.attachments.download('provider-attachment-id');Live Photo companion frames are not included in the normalized download yet.
photon() reads PHOTON_PROJECT_ID, PHOTON_PROJECT_SECRET,
PHOTON_PHONE_NUMBER, and PHOTON_WEBHOOK_SECRET. Explicit options
override environment values.
Available normalized message, attachment download, conversation, reaction, typing, read, webhook verification, and webhook event operations are stable in v0.1.
Run the opt-in live test from the repository root:
pnpm --filter @imessage-sdk/photon test:integrationSee the repository README for capabilities, attachments, webhooks, and required live-test variables.
