fixed API key details for SSR, added screenshots for create message in provider docs

This commit is contained in:
Vincent (Wen Yu) Ge
2024-02-12 20:49:59 -05:00
parent 2b722c07b6
commit e181f03d0d
12 changed files with 48 additions and 12 deletions

View File

@@ -10,7 +10,7 @@ Custom token allows you to use [Server SDK](/docs/sdks#server) to generate token
# Create custom token {% #create-custom-token %} # Create custom token {% #create-custom-token %}
Once you have your server endpoint prepared either in an Appwrite Function or a server integration, you can use the [Create token](/docs/references/cloud/server-node/users#createToken) endpoint of the [Users API](/docs/products/auth/users) to generate a token. Once you have your server endpoint prepared either in an Appwrite Function or a server integration, you can use the [Create token](/docs/references/cloud/server-nodejs/users#createToken) endpoint of the [Users API](/docs/products/auth/users) to generate a token.
{% multicode %} {% multicode %}
```js ```js

View File

@@ -39,7 +39,7 @@ Server-side rendering requires a [Server SDK](/docs/sdks#server) instead of a Cl
{% multicode %} {% multicode %}
```js ```js
const { Client, Account } from "appwrite"; import { Client, Account } from "node-appwrite"; // Using the server SDK
const client = new Client() const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
@@ -65,9 +65,11 @@ It is important to use an API key with the `setKey` method, as this will allow y
The API key should have the at least the following scopes in order to perform authentication: The API key should have the at least the following scopes in order to perform authentication:
- `accounts.read` | Category {% width=120 %} | Required scopes | Purpose |
- `accounts.write` |-----------|---------------------|---------|
- `sessions.write` | Accounts | `accounts.read` | Allows API key to read account information. |
| | `accounts.write` | Allows API key to create, update, and delete account information. |
| Sessions | `sessions.write` | Allows API key to create, update, and delete sessions. |
# Creating email/password sessions {% #creating-sessions %} # Creating email/password sessions {% #creating-sessions %}
@@ -221,7 +223,7 @@ OAuth2 requires a few extra steps. First, initiate the flow on the client side
```html ```html
<script type='module'> <script type='module'>
import { Client, Account } from "appwrite"; // Using the client SDK import { Client, Account } from "node-appwrite"; // Using the server SDK
const client = new Client() const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint

View File

@@ -64,7 +64,12 @@ make sure you've configured [a topic](/docs/products/messaging/topic) and [a tar
{% tabs %} {% tabs %}
{% tabsitem #console title="Console" %} {% tabsitem #console title="Console" %}
To send a test message, navigate to **Messaging** > **Messages** > {% icon icon="plus" size="m" /%} **Create message** > **Push notifcation**. To send a test message, navigate to **Messaging** > **Messages** > {% icon icon="plus" size="m" /%} **Create message** > **Push notifcation**.
[SCREENSHOT] {% only_dark %}
![Create email message](/images/docs/messaging/messages/dark/create-push-notification.png)
{% /only_dark %}
{% only_light %}
![Create email message](/images/docs/messaging/messages/create-push-notification.png)
{% /only_light %}
Add your message and in the targets step, select one of your test targets. Set the schedule to **Now** and click **Send**. Add your message and in the targets step, select one of your test targets. Set the schedule to **Now** and click **Send**.

View File

@@ -85,7 +85,12 @@ make sure you've configured [a topic](/docs/products/messaging/topic) and [a tar
{% tabs %} {% tabs %}
{% tabsitem #console title="Console" %} {% tabsitem #console title="Console" %}
To send a test message, navigate to **Messaging** > **Messages** > {% icon icon="plus" size="m" /%} **Create message** > **Push notification**. To send a test message, navigate to **Messaging** > **Messages** > {% icon icon="plus" size="m" /%} **Create message** > **Push notification**.
[SCREENSHOT] {% only_dark %}
![Create email message](/images/docs/messaging/messages/dark/create-push-notification.png)
{% /only_dark %}
{% only_light %}
![Create email message](/images/docs/messaging/messages/create-push-notification.png)
{% /only_light %}
Add your message and in the targets step, select one of your test targets. Set the schedule to **Now** and click **Send**. Add your message and in the targets step, select one of your test targets. Set the schedule to **Now** and click **Send**.

View File

@@ -51,7 +51,12 @@ make sure you've configured [a topic](/docs/products/messaging/topic) and [a tar
{% tabs %} {% tabs %}
{% tabsitem #console title="Console" %} {% tabsitem #console title="Console" %}
To send a test message, navigate to **Messaging** > **Messages** > {% icon icon="plus" size="m" /%} **Create message** > **SMS**. To send a test message, navigate to **Messaging** > **Messages** > {% icon icon="plus" size="m" /%} **Create message** > **SMS**.
[SCREENSHOT] {% only_dark %}
![Create email message](/images/docs/messaging/messages/dark/create-email-message.png)
{% /only_dark %}
{% only_light %}
![Create email message](/images/docs/messaging/messages/create-email-message.png)
{% /only_light %}
Add your message and in the targets step, select one of your test targets. Set the schedule to **Now** and click **Send**. Add your message and in the targets step, select one of your test targets. Set the schedule to **Now** and click **Send**.

View File

@@ -51,7 +51,12 @@ make sure you've configured [a topic](/docs/products/messaging/topic) and [a tar
{% tabs %} {% tabs %}
{% tabsitem #console title="Console" %} {% tabsitem #console title="Console" %}
To send a test message, navigate to **Messaging** > **Messages** > {% icon icon="plus" size="m" /%} **Create message** > **SMS**. To send a test message, navigate to **Messaging** > **Messages** > {% icon icon="plus" size="m" /%} **Create message** > **SMS**.
[SCREENSHOT] {% only_dark %}
![Create email message](/images/docs/messaging/messages/dark/create-email-message.png)
{% /only_dark %}
{% only_light %}
![Create email message](/images/docs/messaging/messages/create-email-message.png)
{% /only_light %}
Add your message and in the targets step, select one of your test targets. Set the schedule to **Now** and click **Send**. Add your message and in the targets step, select one of your test targets. Set the schedule to **Now** and click **Send**.

View File

@@ -51,7 +51,12 @@ make sure you've configured [a topic](/docs/products/messaging/topic) and [a tar
{% tabs %} {% tabs %}
{% tabsitem #console title="Console" %} {% tabsitem #console title="Console" %}
To send a test message, navigate to **Messaging** > **Messages** > {% icon icon="plus" size="m" /%} **Create message** > **SMS**. To send a test message, navigate to **Messaging** > **Messages** > {% icon icon="plus" size="m" /%} **Create message** > **SMS**.
[SCREENSHOT] {% only_dark %}
![Create email message](/images/docs/messaging/messages/dark/create-email-message.png)
{% /only_dark %}
{% only_light %}
![Create email message](/images/docs/messaging/messages/create-email-message.png)
{% /only_light %}
Add your message and in the targets step, select one of your test targets. Set the schedule to **Now** and click **Send**. Add your message and in the targets step, select one of your test targets. Set the schedule to **Now** and click **Send**.

View File

@@ -52,7 +52,12 @@ make sure you've configured [a topic](/docs/products/messaging/topic) and [a tar
{% tabs %} {% tabs %}
{% tabsitem #console title="Console" %} {% tabsitem #console title="Console" %}
To send a test message, navigate to **Messaging** > **Messages** > {% icon icon="plus" size="m" /%} **Create message** > **Email**. To send a test message, navigate to **Messaging** > **Messages** > {% icon icon="plus" size="m" /%} **Create message** > **Email**.
[SCREENSHOT] {% only_dark %}
![Create email message](/images/docs/messaging/messages/dark/create-email-message.png)
{% /only_dark %}
{% only_light %}
![Create email message](/images/docs/messaging/messages/create-email-message.png)
{% /only_light %}
Add your message and in the targets step, select one of your test targets. Set the schedule to **Now** and click **Send**. Add your message and in the targets step, select one of your test targets. Set the schedule to **Now** and click **Send**.

View File

@@ -79,6 +79,7 @@ For this tutorial you'll need an API key with the following scopes:
|-----------|---------------------|---------| |-----------|---------------------|---------|
| Accounts | `accounts.read` | Allows API key to read account information. | | Accounts | `accounts.read` | Allows API key to read account information. |
| | `accounts.write` | Allows API key to create, update, and delete account information. | | | `accounts.write` | Allows API key to create, update, and delete account information. |
| Sessions | `sessions.write` | Allows API key to create, update, and delete sessions. |
{% only_dark %} {% only_dark %}
![Server integrations](/images/docs/quick-starts/dark/integrate-server.png) ![Server integrations](/images/docs/quick-starts/dark/integrate-server.png)

View File

@@ -66,6 +66,7 @@ For this tutorial you'll need an API key with the following scopes:
|-----------|---------------------|---------| |-----------|---------------------|---------|
| Accounts | `accounts.read` | Allows API key to read account information. | | Accounts | `accounts.read` | Allows API key to read account information. |
| | `accounts.write` | Allows API key to create, update, and delete account information. | | | `accounts.write` | Allows API key to create, update, and delete account information. |
| Sessions | `sessions.write` | Allows API key to create, update, and delete sessions. |
{% only_dark %} {% only_dark %}
![Server integrations](/images/docs/quick-starts/dark/integrate-server.png) ![Server integrations](/images/docs/quick-starts/dark/integrate-server.png)

View File

@@ -78,6 +78,7 @@ For this tutorial you'll need an API key with the following scopes:
|-----------|---------------------|---------| |-----------|---------------------|---------|
| Accounts | `accounts.read` | Allows API key to read account information. | | Accounts | `accounts.read` | Allows API key to read account information. |
| | `accounts.write` | Allows API key to create, update, and delete account information. | | | `accounts.write` | Allows API key to create, update, and delete account information. |
| Sessions | `sessions.write` | Allows API key to create, update, and delete sessions. |
{% only_dark %} {% only_dark %}
![Server integrations](/images/docs/quick-starts/dark/integrate-server.png) ![Server integrations](/images/docs/quick-starts/dark/integrate-server.png)

View File

@@ -73,6 +73,7 @@ For this tutorial you'll need an API key with the following scopes:
|-----------|---------------------|---------| |-----------|---------------------|---------|
| Accounts | `accounts.read` | Allows API key to read account information. | | Accounts | `accounts.read` | Allows API key to read account information. |
| | `accounts.write` | Allows API key to create, update, and delete account information. | | | `accounts.write` | Allows API key to create, update, and delete account information. |
| Sessions | `sessions.write` | Allows API key to create, update, and delete sessions. |
{% only_dark %} {% only_dark %}
![Server integrations](/images/docs/quick-starts/dark/integrate-server.png) ![Server integrations](/images/docs/quick-starts/dark/integrate-server.png)