Skip to content

Commit

Permalink
Merge pull request #563 from appwrite/providers
Browse files Browse the repository at this point in the history
Add all providers
  • Loading branch information
Vincent (Wen Yu) Ge authored Feb 4, 2024
2 parents d8fe4ea + 9fc9a02 commit 972e83e
Show file tree
Hide file tree
Showing 12 changed files with 797 additions and 24 deletions.
12 changes: 6 additions & 6 deletions src/routes/docs/Sidebar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,18 @@
icon: 'icon-lightning-bolt',
isParent: true
},
{
label: 'Messaging',
href: '/docs/products/messaging',
icon: 'icon-send',
isParent: true
},
{
label: 'Storage',
href: '/docs/products/storage',
icon: 'icon-folder',
isParent: true
},
{
label: 'Messaging',
href: '/docs/products/messaging',
icon: 'icon-send',
isParent: true
}
]
},
{
Expand Down
10 changes: 5 additions & 5 deletions src/routes/docs/products/messaging/providers/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
items: [
{
label: 'Overview',
href: '/docs/products/messaging'
href: '/docs/products/messaging/providers'
},
]
},
Expand All @@ -22,11 +22,11 @@
items: [
{
label: 'FCM',
href: '/docs/products/messaging/providers'
href: '/docs/products/messaging/providers/fcm'
},
{
label: 'APNs',
href: '/docs/products/messaging/targets'
href: '/docs/products/messaging/providers/apns'
},
]
},
Expand All @@ -47,8 +47,8 @@
label: 'SMS',
items: [
{
label: 'Twillio',
href: '/docs/products/messaging/providers/twillio'
label: 'Twilio',
href: '/docs/products/messaging/providers/twilio'
},
{
label: 'MSG91',
Expand Down
5 changes: 3 additions & 2 deletions src/routes/docs/products/messaging/providers/+page.markdoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: article
title: Providers
description: Learn the different providers that you can use to send messages with Appwrite.
back: /docs/products/messaging
---

Appwrite allows you to connect to a variety of third-party messaging providers to deliver push notifications, emails, and SMS messages to your users.
Expand Down Expand Up @@ -33,8 +34,8 @@ Deliver custom email messages to users using Sendgrid.
# SMS {% #sms %}
Send customized SMS messages to users by phone to send reminders, updates, promotions, and one-time passwords.
{% cards %}
{% cards_item href="/docs/products/messaging/providers/twillio" title="Twillio" %}
Deliver custom SMS messages to users using Twillio.
{% cards_item href="/docs/products/messaging/providers/twilio" title="Twilio" %}
Deliver custom SMS messages to users using Twilio.
{% /cards_item %}
{% cards_item href="/docs/products/messaging/providers/msg91" title="MSG91" %}
Deliver custom SMS messages to users using MSG91.
Expand Down
43 changes: 41 additions & 2 deletions src/routes/docs/products/messaging/providers/apns/+page.markdoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: article
title: Apple Push Notification service
description: Send push notifications to apps on Apple devices through Apple Push Notification service (APNs) using Appwrite Messaging.
back: /docs
back: /docs/products/messaging/providers
---

Apple Push Notification service (APNs) lets you send push notifications to Apple devices like macOS, iOS, tvOS, iPadOS, and watchOS devices.
Expand All @@ -11,7 +11,7 @@ APNs will save the last [N] messages for [M] days and attempt delivery as soon a

{% section #add-provider step=1 title="Add provider" %}

To add APNs as a provier, navigate to **Messaging** > **Providers** > {% icon icon="plus" size="m" /%} **Add provider** > **Push notification**.
To add APNs as a provider, navigate to **Messaging** > **Providers** > {% icon icon="plus" size="m" /%} **Add provider** > **Push notification**.
[SCREENSHOT]

Give your provider a name > choose **APNS** > click **Save and continue**.
Expand Down Expand Up @@ -47,6 +47,45 @@ After adding the following details, click **Save and continue** to enable the pr
{% /section %}

{% section #test-provider step=3 title="Test provider" %}
Before sending your first message,
make sure you've configured [a topic](/docs/products/messaging/topic) and [a target](/docs/products/messaging/target) to send messages to.
{% tabs %}
{% tabsitem #console title="Console" %}
To send a test message, navigate to **Messaging** > **Messages** > {% icon icon="plus" size="m" /%} **Create message** > **Push notifcation**.
[SCREENSHOT]

Add your message and in the targets step, select one of your test targets. Set the schedule to **Now** and click **Send**.

Verify that you can receive the message in your inbox. If not
{% /tabsitem %}

{% tabsitem #server-sdk title="Server SDK" %}
To send a message programmatically, use an [Appwrite Server SDK](/docs/sdks#server).
{% multicode %}
```js
```
```deno
```
```php
```
```python
```
```ruby
```
```csharp
```
```dart
```
```kotlin
```
```java
```
```swift
```
{% /multicode %}
{% /tabsitem %}
{% /tabs %}

You can follow the [Send push notifications](TODO) journey to send your first push notification and test your provider.
{% /section %}

Expand Down
94 changes: 85 additions & 9 deletions src/routes/docs/products/messaging/providers/fcm/+page.markdoc
Original file line number Diff line number Diff line change
@@ -1,14 +1,90 @@
---
layout: article
title: Apple Push Notification service
description: Send push notifications to apps on Apple devices through Apple Push Notification service (APNs) using Appwrite Messaging.
back: /docs
title: Firebase Cloud Messaging
description: Send push notifications to Android, Apple, or Web app with Firebase Cloud Messaging (FCM).
back: /docs/products/messaging/providers
---

Apple Push Notification service (APNs) lets you send push notifications to Apple devices like macOS, iOS, tvOS, iPadOS, and watchOS devices.
APNs is a best-effort service, and will attempt to deliver you messages to your device when it's online and available again.
APNs will save the last [N] messages for [M] days and attempt delivery as soon as it's online.
Firebase Cloud Messaging (FCM) lets you send push notifications to your iOS, Android, and web apps through Appwrite Messaging.
Before you can deliver messages, you must connect to a messaging provider.

# Add provider {% #add-provider %}
To add APNs as a provier, navigate to **Messaging** > **Providers** > {% icon icon="plus" /%} **Add provider**
[SCREENSHOT]
{% section #add-provider step=1 title="Add provider" %}

To add FCM as a provider, navigate to **Messaging** > **Providers** > {% icon icon="plus" size="m" /%} **Add provider** > **Push notification**.
[SCREENSHOT]

Give your provider a name > choose **FCM** > click **Save and continue**.
The provider will be saved to your project, but not enabled until you complete its configuration.
{% /section %}
{% section #configure-provider step=2 title="Configure provider" %}

In the **Configure** step, you will need to provide details form your Firebase console to connect your Appwrite project.

[SCREENSHOT]

You will need to provide the following information from the **Firebase console**.

{% info title="Enable FCM" %}
FCM must be enabled on your Firebase project.

Head to Firebase console -> Settings -> Project settings -> Cloud Messaging.
If FCM is disabled, click the three-dots menu and open the link. On the following page, click **Enable** (it might take a few minutes for the action to complete).
{% /info %}

{% table %}
* Field name
*
---
* Server key (.json file)
* Head to Project settings -> Service accounts -> Generate new private key.
{% /table %}

After adding the following details, click **Save and continue** to enable the provider.
{% /section %}

{% section #test-provider step=3 title="Test provider" %}
Before sending your first message,
make sure you've configured [a topic](/docs/products/messaging/topic) and [a target](/docs/products/messaging/target) to send messages to.
{% tabs %}
{% tabsitem #console title="Console" %}
To send a test message, navigate to **Messaging** > **Messages** > {% icon icon="plus" size="m" /%} **Create message** > **Push notification**.
[SCREENSHOT]

Add your message and in the targets step, select one of your test targets. Set the schedule to **Now** and click **Send**.

Verify that you can receive the message in your inbox. If not
{% /tabsitem %}

{% tabsitem #server-sdk title="Server SDK" %}
To send a message programmatically, use an [Appwrite Server SDK](/docs/sdks#server).
{% multicode %}
```js
```
```deno
```
```php
```
```python
```
```ruby
```
```csharp
```
```dart
```
```kotlin
```
```java
```
```swift
```
{% /multicode %}
{% /tabsitem %}
{% /tabs %}

You can follow the [Send push notifications](TODO) journey to send your first push notification and test your provider.
{% /section %}

{% section #manage-provider step=4 title="Manage provider" %}
[TODO: How to update and delete provider.]
{% /section %}
103 changes: 103 additions & 0 deletions src/routes/docs/products/messaging/providers/mailgun/+page.markdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
---
layout: article
title: Mailgun
description: Send emails to your Appwrite users using Mailgun and Appwrite Messaging.
back: /docs/products/messaging/providers
---

Mailgun lets you send customized email messages to your users.
These emails can be sent immediately or scheduled.
You can send emails for purposes like reminders, promotions, announcements, and even custom authentication flows.

{% section #add-provider step=1 title="Add provider" %}

To add Mailgun as a provider, navigate to **Messaging** > **Providers** > {% icon icon="plus" size="m" /%} **Add provider** > **Email**.
[SCREENSHOT]

Give your provider a name > choose **Mailgun** > click **Save and continue**.
The provider will be saved to your project, but not enabled until you complete its configuration.
{% /section %}
{% section #configure-provider step=2 title="Configure provider" %}

In the **Configure** step, you will need to provide details form your Mailgun dashboard to connect your Appwrite project.

[SCREENSHOT]

You will need to provide the following information from your **Mailgun dashboard**.

{% table %}
* Field name
*
---
* API key
* Head to Profile -> API Security -> Add new key.
---
* Domain
* Head to Sending -> Domains -> Add new domain.
Follow [Mailgun's instructions](https://help.mailgun.com/hc/en-us/articles/360026833053-Domain-Verification-Walkthrough) to verify the domain name.
---
* EU region
* Enable the EU region setting if your domain is within the European Union.
---
* Sender email
* [TODO]
---
* Sender name
* [TODO]
---
* Reply-to email
* [TODO]
---
* Reply-to name
* [TODO]
{% /table %}

After adding the following details, click **Save and continue** to enable the provider.
{% /section %}

{% section #test-provider step=3 title="Test provider" %}
Before sending your first message,
make sure you've configured [a topic](/docs/products/messaging/topic) and [a target](/docs/products/messaging/target) to send messages to.
{% tabs %}
{% tabsitem #console title="Console" %}
To send a test message, navigate to **Messaging** > **Messages** > {% icon icon="plus" size="m" /%} **Create message** > **Email**.
[SCREENSHOT]

Add your message and in the targets step, select one of your test targets. Set the schedule to **Now** and click **Send**.

Verify that you can receive the message in your inbox. If not
{% /tabsitem %}

{% tabsitem #server-sdk title="Server SDK" %}
To send a message programmatically, use an [Appwrite Server SDK](/docs/sdks#server).
{% multicode %}
```js
```
```deno
```
```php
```
```python
```
```ruby
```
```csharp
```
```dart
```
```kotlin
```
```java
```
```swift
```
{% /multicode %}
{% /tabsitem %}
{% /tabs %}

You can follow the [Send push notifications](TODO) journey to send your first push notification and test your provider.
{% /section %}

{% section #manage-provider step=4 title="Manage provider" %}
[TODO: How to update and delete provider.]
{% /section %}
Loading

0 comments on commit 972e83e

Please sign in to comment.