Skip to main content
SDK v7.x · Last verified March 2026 · iOS · Android · Web · Flutter
Full walkthrough below ↓
Platform note — code samples below use TypeScript. Every method has an equivalent in the iOS (Swift), Android (Kotlin), and Flutter (Dart) SDKs — see the linked SDK reference in each step.
Rich media messages—images, voice clips, videos, and file attachments—dramatically increase engagement and are expected in any modern chat UI. social.plus handles uploading, storage, and delivery so you only need to manage the user’s file picker and the message creation call.
Prerequisites: Basic message sending is working → Sending Messages

Limits at a Glance

Quick Start: Send an Image

Step-by-Step Implementation

1

Upload the file first

All media in social.plus follows an upload-then-send pattern. Upload the raw file to get a fileId, then reference that ID in the message.
File Upload
2

Send image and video messages

3

Send audio and file messages

4

Send custom messages

The custom dataType lets you send any JSON payload. Use it for link previews, poll cards, system events, or any structured message type your app needs.
Your client app must know how to render each custom type. The social.plus SDK delivers the raw JSON — the UI rendering is your responsibility.
Custom Messages
5

Render media thumbnails in the message list

When querying messages, each media message includes pre-generated thumbnail URLs:

Connect to Moderation & Analytics

Enable AI image moderation in Admin Console → AI Content Moderation to automatically flag or block NSFW images in chat before other users see them.AI Content Moderation
Configure allowed file types and maximum file sizes in Admin Console → Network Settings. The SDK enforces these limits client-side before uploading.Network Settings

Common Mistakes

Sending fileId before the upload completes — Always await the upload call and check for errors before calling createMessage. A partially-uploaded file will produce a broken message that can’t be recovered.
Storing file URLs directly — File URLs from the social.plus CDN are signed and expire. Always store the fileId in your database, not the URL. Regenerate download URLs on demand.

Best Practices

For videos and large files, display a progress bar during upload. This prevents the user from thinking the send button is broken on slow connections. The file upload callback provides a progress percentage (0–100).
Compress images to ≤ 2MB before uploading. High-res photos degrade channel load times for all members and increase storage costs. Apply client-side compression in the file picker.
For complex UI elements (polls, product cards, event invites), use the custom dataType with a versioned type field. This lets you iterate on card designs server-side without forcing app updates.
Dive deeper: Messaging API Reference has full parameter tables, method signatures, and platform-specific details for every API used in this guide.

Next Steps

Message Reactions & Replies

Let users react to and thread on your rich media messages.

Chat Moderation

Moderate images and files before they reach other members.

Direct Messages Path

Full DM build path showing where rich media fits in the flow.