Skip to main content
Retrieve an attachment by its iMessage GUID using getAttachment on the narrowed platform instance. The returned is lazy. .read() and .stream() each trigger an independent download, so cache .read() if you need the bytes more than once.
In multi-phone mode, pass the phone number as the second argument to route the request through the correct instance:
When only one phone is configured, or in shared-pool mode, the phone parameter is optional.
getAttachment requires @spectrum-ts/imessage. With @spectrum-ts/imessage-local, it throws an . Local inbound attachments are still available through each incoming message’s content.