Docs
Skip to content

Messaging

Send SMS messages_

Send SMS messages to your users using Appwrite Messaging.

2 min read

Raw

You can send custom SMS messages to your app's users using Appwrite Messaging and a connected SMTP service. This guide takes you through the implementation path of adding SMS messaging to your app.

Add a provider

Appwrite supports Twilio, MSG91, Telesign, Textmagic, and Vonage as SMS providers. You must configure one of them as a provider.

Add a SMTP provider
Add a SMTP provider

To add a new provider navigate to Messaging > Providers > Add provider > SMS and follow the wizard. You can find more details about configuring in the provider guides for Twilio, MSG91, Telesign, Textmagic, and Vonage.

Add targets

In Appwrite Messaging, each user has targets like their email, phone number, and devices with your app installed. You can deliver messages to users through their targets.

Target overview
Target overview

If the user signed up with phone (SMS) authentication, their account would already have a phone number as a target. During development, you can add targets to existing accounts by navigating to Authentication > Users > Select a user > Targets > Add a subscriber.

Add a target
Add a target

You can also implement forms in your app to collect contact information and add it as a target with the createSubscriber endpoint.

Create topics (optional)

You can use topics to organize targets that should receive the same messages, so you can send SMS messages to groups of targets instead of one at time. This step is optional if you plan to only send SMS messages to individual targets.

To create a topic in the Appwrite Console, navigate to Messaging > Topics > Create topic.

Add a target
Add a target

You can also create topics programmatically using an Appwrite Server SDK.

Send SMS messages

You can send SMS messages using a Server SDK. To send an SMS messages immediately, you can call the createSms endpoint without passing either the draft or scheduledAt parameters.

Schedule SMS message

To send an scheduled SMS message, you can call the createSms endpoint with scheduledAt as a ISO 8601 date time string for the scheduled time.

Was this page helpful?

Share what worked or what we should fix. Once approved, our agents automatically apply suggested updates to the docs.