mirror of
https://github.com/LukeHagar/website.git
synced 2025-12-10 12:57:49 +00:00
fixed API key details for SSR, added screenshots for create message in provider docs
This commit is contained in:
@@ -10,7 +10,7 @@ Custom token allows you to use [Server SDK](/docs/sdks#server) to generate 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 %}
|
||||
```js
|
||||
|
||||
@@ -39,7 +39,7 @@ Server-side rendering requires a [Server SDK](/docs/sdks#server) instead of a Cl
|
||||
|
||||
{% multicode %}
|
||||
```js
|
||||
const { Client, Account } from "appwrite";
|
||||
import { Client, Account } from "node-appwrite"; // Using the server SDK
|
||||
|
||||
const client = new Client()
|
||||
.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:
|
||||
|
||||
- `accounts.read`
|
||||
- `accounts.write`
|
||||
- `sessions.write`
|
||||
| Category {% width=120 %} | Required scopes | Purpose |
|
||||
|-----------|---------------------|---------|
|
||||
| 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 %}
|
||||
|
||||
@@ -221,7 +223,7 @@ OAuth2 requires a few extra steps. First, initiate the flow on the client side
|
||||
|
||||
```html
|
||||
<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()
|
||||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
||||
|
||||
@@ -64,7 +64,12 @@ make sure you've configured [a topic](/docs/products/messaging/topic) and [a tar
|
||||
{% tabs %}
|
||||
{% tabsitem #console title="Console" %}
|
||||
To send a test message, navigate to **Messaging** > **Messages** > {% icon icon="plus" size="m" /%} **Create message** > **Push notifcation**.
|
||||
[SCREENSHOT]
|
||||
{% only_dark %}
|
||||

|
||||
{% /only_dark %}
|
||||
{% only_light %}
|
||||

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

|
||||
{% /only_dark %}
|
||||
{% only_light %}
|
||||

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

|
||||
{% /only_dark %}
|
||||
{% only_light %}
|
||||

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

|
||||
{% /only_dark %}
|
||||
{% only_light %}
|
||||

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

|
||||
{% /only_dark %}
|
||||
{% only_light %}
|
||||

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

|
||||
{% /only_dark %}
|
||||
{% only_light %}
|
||||

|
||||
{% /only_light %}
|
||||
|
||||
Add your message and in the targets step, select one of your test targets. Set the schedule to **Now** and click **Send**.
|
||||
|
||||
|
||||
@@ -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.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 %}
|
||||

|
||||
|
||||
@@ -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.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 %}
|
||||

|
||||
|
||||
@@ -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.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 %}
|
||||

|
||||
|
||||
@@ -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.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 %}
|
||||

|
||||
|
||||
Reference in New Issue
Block a user