<?php
$platforms = $this->getParam('platforms');
$versions = [];

foreach($platforms['server']['sdks'] ?? [] as $lang) {
    $key = $lang['key'] ?? '';
    $version = $lang['version'] ?? '';

    if(!empty($key)) {
        $versions[$key] = $version;
    }
}

$kotlinVersion = $versions['kotlin'] ?? '';
$swiftVersion = $versions['swift'] ?? '';
?>

<p>Appwrite is a development platform that provides a powerful API and management console to get your next project up and running quickly.</p>

<p><a target="_blank" rel="noopener" href="https://cloud.appwrite.io/">Create your first project now</a> and start building on Appwrite Cloud.</p>

<h2><a href="/docs/getting-started-for-server#getSDK" id="getSDK">Get the Appwrite SDK for Your Platform</a></h2>

<p>We provide libraries and SDKs for major programming languages and platforms so you don't have to write code for interacting with our HTTP APIs from scratch.</p>

<p>Choose your desired SDK corresponding to your product development platform and import it using the given package manager. <b>For the sake of this tutorial we use code examples using Appwrite SDKs for Node.js, PHP, Python, Ruby, Dart, and Deno, but the same can be applied to any of <a href="/docs/sdks#server">our server side SDKs</a></b>.</p>

<ul class="phases clear" data-ui-phases>
    <li>
        <h3>Node.js</h3>
        <div class="ide margin-top-small" data-lang="bash" data-lang-label="Bash">
            <pre class="line-numbers"><code class="prism language-bash" data-prism>npm install node-appwrite --save</code></pre>
        </div>
    </li>
    <li>
        <h3>PHP</h3>
        <div class="ide margin-top-small" data-lang="bash" data-lang-label="Bash">
            <pre class="line-numbers"><code class="prism language-bash" data-prism>composer require 'appwrite/appwrite'</code></pre>
        </div>
    </li>
    <li>
        <h3>Python</h3>
        <div class="ide margin-top-small" data-lang="bash" data-lang-label="Bash">
            <pre class="line-numbers"><code class="prism language-bash" data-prism>pip install appwrite</code></pre>
        </div>
    </li>
    <li>
        <h3>Ruby</h3>
        <div class="ide margin-top-small" data-lang="bash" data-lang-label="Bash">
            <pre class="line-numbers"><code class="prism language-bash" data-prism>gem install appwrite</code></pre>
        </div>
    </li>
    <li>
        <h3>Deno</h3>
        <div class="ide margin-top-small" data-lang="typescript" data-lang-label="Deno SDK">
            <pre class="line-numbers"><code class="prism language-typescript" data-prism>import * as sdk from "https://deno.land/x/appwrite/mod.ts";</code></pre>
        </div>
    </li>
    <li>
        <h3>Dart</h3>
        <div class="ide margin-top-small" data-lang="bash" data-lang-label="Bash">
            <pre class="line-numbers"><code class="prism language-bash" data-prism>dart pub add dart_appwrite</code></pre>
        </div>
    </li>
    <li>
        <h3>Kotlin</h3>
        <div>
            <p>Add maven repositories to your <b>build.gradle(.kts)</b> file</p>
            <div class="ide margin-top-small" data-lang="groovy" data-lang-label="Groovy">
                <pre class="line-numbers"><code class="prism language-groovy" data-prism>repositories {
    mavenCentral()
}</code></pre>
            </div>
            <p>Add Appwrite SDK under dependencies in your <b>build.gradle(.kts)</b> file</p>
            <div class="ide margin-top-small" data-lang="groovy" data-lang-label="Groovy">
                <pre class="line-numbers"><code class="prism language-groovy" data-prism>dependencies {
    implementation("io.appwrite:sdk-for-kotlin:<?php echo $this->escape($kotlinVersion); ?>")
}</code></pre>
            </div>
        </div>
    </li>
    <li>
        <h3>Swift</h3>
        <div>
            <p>Add the Appwrite Swift SDK package as a dependency</p>
            <div class="ide margin-top-small" data-lang="swift" data-lang-label="Swift">
            <pre class="line-numbers"><code class="prism language-swift" data-prism>dependencies: [
    .package(
        name: "Appwrite",
        url: "https://github.com/appwrite/sdk-for-swift.git",
        .exact("<?php echo $this->escape($swiftVersion); ?>")
    )
]</code></pre>
            </div>
            <p>Add the dependency product to your target</p>
            <div class="ide margin-top-small" data-lang="swift" data-lang-label="Swift">
            <pre class="line-numbers"><code class="prism language-swift" data-prism>dependencies: [
    "Appwrite"
]</code></pre>
        </div>
    </li>
    <li>
        <h3>.NET</h3>
        <div class="ide margin-top-small" data-lang="csharp" data-lang-label="C#">
            <pre class="line-numbers"><code class="prism language-csharp" data-prism>dotnet add package Appwrite</code></pre>
        </div>
    </li>
</ul>

<h2><a href="/docs/getting-started-for-server#createProject" id="createProject">Create Your First Appwrite Project</a></h2>

<p>Go to your new Appwrite Console and click the <i class="icon-plus"></i> icon in the top navigation header or on the <b>'Create Project'</b> button on your console homepage. Choose a name for your project and click create to get started.</p>

<h2><a href="/docs/getting-started-for-server#authentication" id="authentication">Authentication</a></h2>

<p>The Appwrite server API provides you with two authentication methods. The first one uses an API key, and the second is using a JSON Web Token (JWT). Each method has different use cases, and you can use whichever fills your app needs.</p>

<h3><a href="/docs/getting-started-for-server#apiKey" id="apiKey">API Key</a></h3>

<p>Using an API Key you can interact with the Appwrite server API as an admin. You'll be able to access all of your project resources as long as your key has the relevant access scopes attached. To get your first API key, go to your appwrite console, choose the project you created in the step before and click the 'API Keys' link.</p>

<p>Inside your API keys screen, click the 'Add API Key' button, choose your key name, for example: 'Demo Key', and select the scopes your key are granted to use. After complete, you could copy your new API Key and use it to initialize your Appwrite server SDK. To learn about the different API scopes available to you, read more about <a href="/docs/keys">Appwrite API Keys</a> </p>

<ul class="phases clear" data-ui-phases>
    <li>
        <h3>Node.js</h3>
        <div class="ide margin-top-small" data-lang="nodejs" data-lang-label="Node.js SDK">
            <pre class="line-numbers"><code class="prism language-javascript" data-prism>const { Client } = require('node-appwrite');

const client = new Client()
    .setEndpoint('https://cloud.appwrite.io/v1') // Your Appwrite Endpoint
    .setProject('[PROJECT_ID]')                // Your project ID
    .setKey('919c2db5d4...a2a3346ad2');         // Your secret API key
</code></pre>
        </div>
    </li>
    <li>
        <h3>PHP</h3>

        <div class="ide margin-top-small" data-lang="php" data-lang-label="PHP SDK">
            <pre class="line-numbers"><code class="prism language-php" data-prism>use Appwrite\Client;

$client = (new Client())
    ->setEndpoint('https://cloud.appwrite.io/v1') // Your Appwrite Endpoint
    ->setProject('[PROJECT_ID]')                // Your project ID
    ->setKey('919c2db5d4...a2a3346ad2');         // Your secret API key
</code></pre>
        </div>
    </li>
    <li>
        <h3>Python</h3>
        <div class="ide margin-top-small" data-lang="python" data-lang-label="Python SDK">
            <pre class="line-numbers"><code class="prism language-python" data-prism>from appwrite.client import Client

client = Client()

client = (client
    .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
    .set_project('[PROJECT_ID]')                # Your project ID
    .set_key('919c2db5d4...a2a3346ad2')          # Your secret API key
)
</code></pre>
        </div>
    </li>
    <li>
        <h3>Ruby</h3>
        <div class="ide margin-top-small" data-lang="ruby" data-lang-label="Ruby SDK">
            <pre class="line-numbers"><code class="prism language-ruby" data-prism>require 'appwrite'

client = Appwrite::Client.new()
    .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
    .set_project('[PROJECT_ID]')                # Your project ID
    .set_key('919c2db5d4...a2a3346ad2')          # Your secret API key
</code></pre>
        </div>
    </li>
    <li>
        <h3>Deno</h3>
        <div class="ide margin-top-small" data-lang="typescript" data-lang-label="Deno SDK">
            <pre class="line-numbers"><code class="prism language-typescript" data-prism>import { Client } from "https://deno.land/x/appwrite/mod.ts";

const client = new Client()
    .setEndpoint('https://cloud.appwrite.io/v1') // Your Appwrite Endpoint
    .setProject('[PROJECT_ID]')                // Your project ID
    .setKey('919c2db5d4...a2a3346ad2');         // Your secret API key
</code></pre>
        </div>
    </li>
    <li>
        <h3>Dart</h3>
        <div class="ide margin-top-small" data-lang="dart" data-lang-label="Dart SDK">
            <pre class="line-numbers"><code class="prism language-dart" data-prism>import 'package:dart_appwrite/dart_appwrite.dart';

Client client = Client()
    .setEndpoint('https://cloud.appwrite.io/v1') // Your Appwrite Endpoint
    .setProject('[PROJECT_ID]')                // Your project ID
    .setKey('919c2db5d4...a2a3346ad2');         // Your secret API key
</code></pre>
        </div>
    </li>
    <li>
        <h3>Kotlin</h3>
        <div class="ide margin-top-small" data-lang="kotlin" data-lang-label="Kotlin SDK">
            <pre class="line-numbers"><code class="prism language-kotlin" data-prism>import io.appwrite.Client

val client = Client()
    .setEndpoint("https://cloud.appwrite.io/v1") // Your Appwrite Endpoint
    .setProject("[PROJECT_ID]")                // Your project ID
    .setKey("919c2db5d4...a2a3346ad2")          // Your secret API key
</code></pre>
        </div>
    </li>
    <li>
        <h3>Swift</h3>
        <div class="ide margin-top-small" data-lang="swift" data-lang-label="Swift SDK">
            <pre class="line-numbers"><code class="prism language-swift" data-prism>import Appwrite

let client = Client()
    .setEndpoint("https://cloud.appwrite.io/v1") // Your Appwrite Endpoint
    .setProject("[PROJECT_ID]")                // Your project ID
    .setKey("919c2db5d4...a2a3346ad2")          // Your secret API key
</code></pre>
        </div>
    </li>
    <li>
        <h3>.NET</h3>
        <div class="ide margin-top-small" data-lang="csharp" data-lang-label=".NET SDK">
            <pre class="line-numbers"><code class="prism language-csharp" data-prism>using Appwrite;

var client = new Client()
  .SetEndpoint("https://cloud.appwrite.io/v1")  // Your Appwrite Endpoint
  .SetProject("[PROJECT_ID]")               // Your project ID
  .SetKey("919c2db5d4...a2a3346ad2");                        // Your secret API Key</code></pre>
        </div>
    </li>
</ul>

<div class="notice">
    <h3>API Key Authentication</h3>
    <p>When using Server SDKs, you authenticate with API keys. API keys are not restricted by account-based permissions but have restrictions on the types of resources that can be accessed. This means API keys can access all resources of specified types, regardless of which account can access them.</p>

    <p><a href="/docs/keys">Learn more about API keys</a></p>
</div>

<h3><a href="/docs/getting-started-for-server#jwt" id="jwt">JSON Web Token (JWT) &nbsp;<span class="text-size-small text-fade">version >= 0.8</span></a></h3>

<p>Using a JSON Web Token (JWT), you can interact with the Appwrite server API as a specific user. You'll be able to access only the relevant user resources and perform actions on his behalf.</p>

<p>To create a JWT, you need to use the "account->createJWT" method using one of the Appwrite client SDKs. Before creating a token, you need to make sure your user is authenticated using the <span class="tag">createSession</span> method or log in with an OAuth provider.</p>

<ul class="phases clear" data-ui-phases>
    <li>
        <h3>Web SDK</h3>
        <div class="ide margin-top-small" data-lang="javascript" data-lang-label="Web SDK">
            <pre class="line-numbers"><code class="prism language-javascript" data-prism>const account = new Account(client);
account.createJWT()
    .then(function (response) {
        console.log(response);
    }, function (error) {
        console.log(error);
    });</code></pre>
        </div>
    </li>
    <li>
        <h3>Flutter SDK</h3>
        <div class="ide margin-top-small" data-lang="dart" data-lang-label="Flutter SDK">
            <pre class="line-numbers"><code class="prism language-dart" data-prism>Account account = Account(client);

Response user = await account.createJWT();
</code></pre>
        </div>
    </li>
    <li>
        <h3>Android SDK</h3>
        <div class="ide margin-top-small" data-lang="kotlin" data-lang-label="Android SDK">
            <pre class="line-numbers"><code class="prism language-kotlin" data-prism>val account = Account(client)

val response = account.createJWT()
</code></pre>
        </div>
    </li>
    <li>
        <h3>Apple SDK</h3>
        <div class="ide margin-top-small" data-lang="swift" data-lang-label="Apple SDK">
            <pre class="line-numbers"><code class="prism language-swift" data-prism>let account = Account(client)

let response = try await account.createJWT()</code></pre>
        </div>
    </li>
</ul>

<p>After you get your valid token, you can pass it to your server and use it to initialize your Appwrite Server SDK and start making API calls. Your JWT is valid for a maximum time of 15 minutes or less if the user session has expired before that time.</p>


<ul class="phases clear" data-ui-phases>
    <li>
        <h3>Node.js</h3>
        <div class="ide margin-top-small" data-lang="nodejs" data-lang-label="Node.js SDK">
            <pre class="line-numbers"><code class="prism language-javascript" data-prism>const { Client } = require('node-appwrite');

const client = new Client()
    .setEndpoint('https://cloud.appwrite.io/v1') // Your Appwrite Endpoint
    .setProject('[PROJECT_ID]')                // Your project ID
    .setJWT('919c2db5d4...a2a3346ad2');         // Your secret JWT
</code></pre>
        </div>
    </li>
    <li>
        <h3>PHP</h3>

        <div class="ide margin-top-small" data-lang="php" data-lang-label="PHP SDK">
            <pre class="line-numbers"><code class="prism language-php" data-prism>use Appwrite\Client;

$client = (new Client())
    ->setEndpoint('https://cloud.appwrite.io/v1') // Your Appwrite Endpoint
    ->setProject('[PROJECT_ID]')                // Your project ID
    ->setJWT('919c2db5d4...a2a3346ad2');         // Your secret JWT
</code></pre>
        </div>
    </li>
    <li>
        <h3>Python</h3>
        <div class="ide margin-top-small" data-lang="python" data-lang-label="Python SDK">
            <pre class="line-numbers"><code class="prism language-python" data-prism>from appwrite.client import Client

client = Client()

client = (client
    .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
    .set_project('[PROJECT_ID]')                # Your project ID
    .set_key('919c2db5d4...a2a3346ad2')          # Your secret API key
)
</code></pre>
        </div>
    </li>
    <li>
        <h3>Ruby</h3>
        <div class="ide margin-top-small" data-lang="ruby" data-lang-label="Ruby SDK">
            <pre class="line-numbers"><code class="prism language-ruby" data-prism>require 'appwrite'

client = Client.new()
    .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
    .set_project('[PROJECT_ID]')                # Your project ID
    .set_key('919c2db5d4...a2a3346ad2')          # Your secret JWT
</code></pre>
        </div>
    </li>
    <li>
        <h3>Deno</h3>
        <div class="ide margin-top-small" data-lang="typescript" data-lang-label="Deno SDK">
            <pre class="line-numbers"><code class="prism language-typescript" data-prism>import { Client } from "https://deno.land/x/appwrite/mod.ts";

const client = new Client()
    .setEndpoint('https://cloud.appwrite.io/v1') // Your Appwrite Endpoint
    .setProject('[PROJECT_ID]')                // Your project ID
    .setJWT('919c2db5d4...a2a3346ad2');         // Your secret JWT
</code></pre>
        </div>
    </li>
    <li>
        <h3>Dart</h3>
        <div class="ide margin-top-small" data-lang="dart" data-lang-label="Dart SDK">
            <pre class="line-numbers"><code class="prism language-dart" data-prism>import 'package:dart_appwrite/dart_appwrite.dart';

Client client = Client()
    .setEndpoint('https://cloud.appwrite.io/v1') // Your Appwrite Endpoint
    .setProject('[PROJECT_ID]')                // Your project ID
    .setJWT('919c2db5d4...a2a3346ad2');         // Your secret JWT
</code></pre>
        </div>
    </li>
    <li>
        <h3>Kotlin</h3>
        <div class="ide margin-top-small" data-lang="kotlin" data-lang-label="Kotlin SDK">
            <pre class="line-numbers"><code class="prism language-kotlin" data-prism>import io.appwrite.Client

val client = Client()
    .setEndpoint("https://cloud.appwrite.io/v1") // Your Appwrite Endpoint
    .setProject("[PROJECT_ID]")                // Your project ID
    .setJWT("919c2db5d4...a2a3346ad2")          // Your secret JWT
</code></pre>
        </div>
    </li>
    <li>
        <h3>Swift</h3>
        <div class="ide margin-top-small" data-lang="swift" data-lang-label="Swift SDK">
            <pre class="line-numbers"><code class="prism language-swift" data-prism>import Appwrite

let client = Client()
    .setEndpoint("https://cloud.appwrite.io/v1") // Your Appwrite Endpoint
    .setProject("[PROJECT_ID]")                // Your project ID
    .setJWT("919c2db5d4...a2a3346ad2")          // Your secret JWT
</code></pre>
        </div>
    </li>
    <li>
        <h3>.NET</h3>
        <div class="ide margin-top-small" data-lang="csharp" data-lang-label=".NET SDK">
            <pre class="line-numbers"><code class="prism language-csharp" data-prism>using Appwrite;

var client = new Client()
  .SetEndpoint("https://cloud.appwrite.io/v1")  // Your Appwrite Endpoint
  .SetProject("[PROJECT_ID]")               // Your project ID
  .SetJWT("919c2db5d4...a2a3346ad2");                        // Your secret JWT
</code></pre>
        </div>
    </li>
</ul>

<h2><a href="/docs/getting-started-for-server#makeRequest" id="makeRequest">Make Your First Request</a></h2>

<p>After your SDK configuration is set, create any of the Appwrite service objects and choose any request to send. Full documentation for any service method you would like to use can be found in your SDK documentation or in the API References section.</p>

<ul class="phases clear" data-ui-phases>
    <li>
        <h3>Node.js</h3>
        <div class="ide margin-top-small" data-lang="nodejs" data-lang-label="Node.js SDK">
            <pre class="line-numbers"><code class="prism language-javascript" data-prism>const { ID, Users } = require('node-appwrite');

const users = new Users(client);

let promise = users.create(
    ID.unique(),
    'email@example.com',
    null,
    'password'
);

promise.then(function (response) {
    console.log(response);
}, function (error) {
    console.log(error);
});</code></pre>
        </div>
    </li>
    <li>
        <h3>PHP</h3>

        <div class="ide margin-top-small" data-lang="php" data-lang-label="PHP SDK">
            <pre class="line-numbers"><code class="prism language-php" data-prism>use Appwrite\ID;
use Appwrite\Services\Users;
                
$users = new Users($client);

$user = $users->create(
    userId: ID::unique(),
    email: 'email@example.com',
    phone: null,
    password: 'password'
);
</code></pre>
        </div>
    </li>
    <li>
        <h3>Python</h3>
        <div class="ide margin-top-small" data-lang="python" data-lang-label="Python SDK">
            <pre class="line-numbers"><code class="prism language-python" data-prism>from appwrite.id import ID
from appwrite.services.users import Users

users = Users(client)

user = users.create(
    user_id=ID.unique(),
    email='email@example.com',
    phone=None,
    password='password'
)</code></pre>
        </div>
    </li>
    <li>
        <h3>Ruby</h3>
        <div class="ide margin-top-small" data-lang="ruby" data-lang-label="Ruby SDK">
            <pre class="line-numbers"><code class="prism language-ruby" data-prism>require 'appwrite'

users = Appwrite::Users.new(client)

user = users.create(
    userId: ID.unique(),
    email: 'email@example.com',
    phone: nil,
    password: 'password'
)</code></pre>
        </div>
    </li>
    <li>
        <h3>Deno</h3>
        <div class="ide margin-top-small" data-lang="typescript" data-lang-label="Deno SDK">
            <pre class="line-numbers"><code class="prism language-typescript" data-prism>import { ID, Users } from "https://deno.land/x/appwrite/mod.ts";
                
const users = new Users(client);

let promise = users.create(
    ID.unique(),
    'email@example.com',
    null,
    'password'
);

promise.then(function (response) {
    console.log(response);
}, function (error) {
    console.log(error);
});</code></pre>
        </div>
    </li>
    <li>
        <h3>Dart</h3>
        <div class="ide margin-top-small" data-lang="dart" data-lang-label="Dart SDK">
            <pre class="line-numbers"><code class="prism language-dart" data-prism>import 'package:dart_appwrite/dart_appwrite.dart';

final users = Users(client);

final user = await users.create(
    userId: ID.unique(),
    email: 'email@example.com',
    phone: null,
    password: 'password'
);</code></pre>
        </div>
    </li>
    <li>
        <h3>Kotlin</h3>
        <div class="ide margin-top-small" data-lang="kotlin" data-lang-label="Kotlin SDK">
            <pre class="line-numbers"><code class="prism language-kotlin" data-prism>import io.appwrite.ID
import io.appwrite.services.Users

val users = Users(client)

val user = users.create(
    userId = ID.unique(),
    email = 'email@example.com',
    phone = null,
    password = 'password'
)</code></pre>
        </div>
    </li>
    <li>
        <h3>Swift</h3>
        <div class="ide margin-top-small" data-lang="swift" data-lang-label="Swift SDK">
            <pre class="line-numbers"><code class="prism language-swift" data-prism>import Appwrite
import AppwriteModels
                
let users = Users(client)

let user = try await users.create(
    userId: ID.unique(),
    email: "email@example.com",
    phone: nil,
    password: "password"
)</code></pre>
        </div>
    </li>
    <li>
        <h3>.NET</h3>
        <div class="ide margin-top-small" data-lang="csharp" data-lang-label=".NET SDK">
            <pre class="line-numbers"><code class="prism language-csharp" data-prism>using Appwrite.Services;
using Appwrite.Models;

var users = new Users(client);

var user = await users.Create(
    userId: ID.Unique(),
    email: "email@example.com",
    phone: null,
    password: "password");</code></pre>
        </div>
    </li>
</ul>

<h2><a href="/docs/getting-started-for-server#fullExample" id="fullExample">Full Example</a></h2>

<ul class="phases clear" data-ui-phases>
    <li>
        <h3>Node.js</h3>
        <div class="ide margin-top-small" data-lang="nodejs" data-lang-label="Node.js SDK">
            <pre class="line-numbers"><code class="prism language-javascript" data-prism>const { Client, ID, Users } = require('node-appwrite');

const client = new Client()
    .setEndpoint('https://cloud.appwrite.io/v1') // Your Appwrite Endpoint
    .setProject('[PROJECT_ID]')                // Your project ID
    .setKey('919c2db5d4...a2a3346ad2');         // Your secret API key

const users = new Users(client);

let promise = users.create(
    ID.unique(),
    'email@example.com',
    null,
    'password'
);

promise.then(function (response) {
    console.log(response);
}, function (error) {
    console.log(error);
});</code></pre>
        </div>
    </li>
    <li>
        <h3>PHP</h3>

        <div class="ide margin-top-small" data-lang="php" data-lang-label="PHP SDK">
            <pre class="line-numbers"><code class="prism language-php" data-prism>use Appwrite\Client;
use Appwrite\ID;
use Appwrite\Services\Users;

$client = (new Client())
    ->setEndpoint('https://cloud.appwrite.io/v1') // Your Appwrite Endpoint
    ->setProject('[PROJECT_ID]')                // Your project ID
    ->setKey('919c2db5d4...a2a3346ad2');         // Your secret API key

$users = new Users($client);

$user = $users->create(
    userId: ID::unique(),
    email: 'email@example.com',
    phone: null,
    password: 'password'
);</code></pre>
        </div>
    </li>
    <li>
        <h3>Python</h3>
        <div class="ide margin-top-small" data-lang="python" data-lang-label="Python SDK">
            <pre class="line-numbers"><code class="prism language-python" data-prism>from appwrite.client import Client
from appwrite.id import ID
from appwrite.services.users import Users

client = Client()

client = (client
    .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
    .set_project('[PROJECT_ID]')                # Your project ID
    .set_key('919c2db5d4...a2a3346ad2')          # Your secret API key
)

users = Users(client)

user = users.create(
    user_id=ID.unique(),
    email='email@example.com',
    phone=None,
    password='password'
)</code></pre>
        </div>
    </li>
    <li>
        <h3>Ruby</h3>
        <div class="ide margin-top-small" data-lang="ruby" data-lang-label="Ruby SDK">
            <pre class="line-numbers"><code class="prism language-ruby" data-prism>require 'appwrite'

include Appwrite

client = Client.new()
    .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
    .set_project('[PROJECT_ID]')                # Your project ID
    .set_key('919c2db5d4...a2a3346ad2')          # Your secret API key

users = Users.new(client)

user = users.create(
    userId: ID.unique(),
    email: 'email@example.com',
    phone: nil,
    password: 'password'
)</code></pre>
        </div>
    </li>
    <li>
        <h3>Deno</h3>
        <div class="ide margin-top-small" data-lang="typescript" data-lang-label="Deno SDK">
            <pre class="line-numbers"><code class="prism language-typescript" data-prism>import { Client, ID, Users } from "https://deno.land/x/appwrite/mod.ts";

const client = new Client()
    .setEndpoint('https://cloud.appwrite.io/v1') // Your Appwrite Endpoint
    .setProject('[PROJECT_ID]')                // Your project ID
    .setKey('919c2db5d4...a2a3346ad2')          // Your secret API key

const users = new Users(client);

let promise = users.create(
    ID.unique(),
    'email@example.com',
    null,
    'password'
);

promise.then(function (response) {
    console.log(response);
}, function (error) {
    console.log(error);
});</code></pre>
        </div>
    </li>
    <li>
        <h3>Dart</h3>
        <div class="ide margin-top-small" data-lang="dart" data-lang-label="Dart SDK">
            <pre class="line-numbers"><code class="prism language-dart" data-prism>import 'package:dart_appwrite/dart_appwrite.dart';

final client = Client()
    .setEndpoint('https://cloud.appwrite.io/v1') // Your Appwrite Endpoint
    .setProject('[PROJECT_ID]')                // Your project ID
    .setKey('919c2db5d4...a2a3346ad2');         // Your secret API key

final users = Users(client);

final user = await users.create(
    userId: ID.unique(),
    email: 'email@example.com',
    phone: null,
    password: 'password'
);</code></pre>
        </div>
    </li>
    <li>
        <h3>Kotlin</h3>
        <div class="ide margin-top-small" data-lang="kotlin" data-lang-label="Kotlin SDK">
            <pre class="line-numbers"><code class="prism language-kotlin" data-prism>import io.appwrite.Client
import io.appwrite.ID
import io.appwrite.services.Users

val client = Client()
    .setEndpoint("https://cloud.appwrite.io/v1") // Your Appwrite Endpoint
    .setProject("[PROJECT_ID]")                // Your project ID
    .setKey("919c2db5d4...a2a3346ad2")          // Your secret API key

val users = Users(client)

val user = users.create(
    userId = ID.unique(),
    email = 'email@example.com',
    phone = null,
    password = 'password'
)</code></pre>
        </div>
    </li>
    <li>
        <h3>Swift</h3>
        <div class="ide margin-top-small" data-lang="swift" data-lang-label="Swift SDK">
            <pre class="line-numbers"><code class="prism language-swift" data-prism>import Appwrite
import AppwriteModels

let client = Client()
    .setEndpoint("https://cloud.appwrite.io/v1") // Your Appwrite Endpoint
    .setProject("[PROJECT_ID]")                // Your project ID
    .setKey("919c2db5d4...a2a3346ad2")          // Your secret API key

let users = Users(client)

let user = try await users.create(
    userId: ID.unique(),
    email: "email@example.com",
    phone: nil,
    password: "password"
)</code></pre>
        </div>
    </li>
    <li>
        <h3>.NET</h3>
        <div class="ide margin-top-small" data-lang="csharp" data-lang-label=".NET SDK">
            <pre class="line-numbers"><code class="prism language-csharp" data-prism>using Appwrite;
using Appwrite.Services;
using Appwrite.Models;

var client = new Client()
  .SetEndpoint("https://cloud.appwrite.io/v1")    // Your Appwrite Endpoint
  .SetProject("[PROJECT_ID]")                 // Your project ID
  .SetKey("cd868db89");                         // Your secret API key

var users = new Users(client);

var user = await users.Create(
    userId: ID.Unique(),
    email: "email@example.com",
    phone: null,
    password: "password");</code></pre>
        </div>
    </li>
</ul>

<h2><a href="/docs/getting-started-for-server#nextSteps" id="nextSteps">Next Steps</a></h2>

<p>Appwrite has many services and tools to help improve your app and speed up your development. The best way to learn how you can take advantage of them is to explore the different API references docs.</p>
